Polish sources, require JDK 8 and switch to Gradle

See individual commit comments for complete details.