Move Travis build steps to script

Instead of having a bunch of crap in yaml.
travis: Only build for OpenJDK for now

OpenJDK seems to build consistently, whereas we have strange OutOfMemory
exceptions with Oracle JDK. Only build with OpenJDK for now.