Fixes to java configuration.

Now the jenkins slave class accepts a parameter to select
the version of the JDK that should be used for the builds.
The default version currently is Java 6.

It also sets java home in /etc/profile.d, so that the right
version of the jdk is enforced even in presence of multiple
jdk packages.