improved the interface for checking convergence in the optimizers.

You can now ask for min.minimizeAndReturnState instead, and that
will give you a state object with a .convergenceReason

fixes #250