Provide a way to get the last state of the solver after an error.
Fix SolverError copy with last state.
Merge pull request #3 from bchretien/get_last_state

Get last state