Converting to Java 8 for the use of lambdas.

Removing the AbstractFunction class because with Java 8 we can convert
all those methods to default methods in the interface. Also converting
a few differentiation methods to lambdas.