Allow SolverState to be modified in the callback.

Thus, one could for example decide to stop the optimization process
by analyzing data in the callback and updating an extra parameter
in SolverState that is then processed by the solver.