Provide JDKs via Docker

@BanzaiMan @MariadeAnton et al, possible alternative for providing JDKs?

AFAICS, the main concern is what Oracle licensing allows.

I cannot find a concrete answer to that at https://www.oracle.com/technetwork/java/javase/terms/products/index.html and https://www.oracle.com/technetwork/java/javase/terms/license/index.html. The BCL only explicitly allows to “reproduce and use internally the Software complete and unmodified for the sole purpose of running Programs”. Whether providing a commercial service with JDK tools themselves qualifies as that under applicable law is something to ask their legal department.

That said, the BCL does allow redistribution, so if Oracle didn’t C&D them for installing the JDK on the fly, having it in the images shouldn’t make much of a difference since the service is essentially the same. This does make it harder for Oracle to cut the service to Travis if they wish to, so if this is actually a legally grey area, this may make a difference.

AppVeyor has Windows JDK preinstalled which is under OTN license. OTN’s license grant provisions allow virtually the same use cases as BCL, so at first glance, preinstalling should be okay.