Added DifferentiableProblem interface.

This interface is necessary for algorithms such as gradient descent.

Implemented the new interface in FunctionOptimisationProblem.
=== Do not merge, development still in progress ===