Set source compatibility in build.gradle files.

This lets us both compile against jdk8 from Gradle and ensuring that
IDEA will use the correct stuffs when running :build task.