Refactor minimizer

This does some tidying up of the optimizer API.  The initial point is now handled in the base class explicitly, so the the `minimize()` function can be overloaded from the base class.

This change has the nice effect of removing some ugly dynamic casts in the `StatisticalInverseProblem` and in one of the tests too.