Add some missing forward declarations.
Provide the last state of Ipopt even when the optimization fails.
Merge pull request #8 from bchretien/get_last_state

Get last state