Add support for Java 8.

@joeferner This PR replaces #164. I believe this PR now provides a complete solution, but please give it a careful look and let me know if you'd like any changes.

Note that I have add compile-java8.code.sh and created a separate test directory test8 for the java8 unit tests. Currently there is only one java8 test. The test does something reasonable if run on a system that does not have a version 1.8 JRE.