MODE-2041 Changed to require JDK 7 in source and runtime.

Also corrected lots of Java warnings and JavaDoc errors/warnings.