Simplify code using Java 8 features.

In particular, every anonymous Predicate and Function has been replaced
with lambdas, and the java.util.stream APIs are used aggressively.
Switch Travis build to Oracle JDK 8.