* optimize: Change initialization, remove Needser, and update Problem function calls
We need a better way to express the Hessian function call so that sparse Hessians can be provided. This change updates the Problem function definitions to allow an arbitrary Symmetric matrix. With this change, we need to change how Location is used, so that we do not allocate a SymDense. Once this location is changed, we no longer need Needser to allocate the appropriate memory, and can shift that to initialization, further simplifying the interfaces.
A 'fake' Problem is passed to Method to continue to make it impossible for the Method to call the functions directly.
Fixes#727, #593.
* optimize: completely overhaul Global
The previous implementation of Global was a minefield for incorrectly implementing global optimization methods. It was very difficult to correctly implement methods (both of the provided methods were incorrect), and the resulting code is very ugly. This commit switches to use channels to communicate, allowing a more clear ordering of concurrent code. This also enables better shutdown of methods.
In addition to the main fix of Global, this refactors the two Global methods to use the updated interface, and makes some small improvements that were previously not possible. In addition, there are some small cleanups of Local to better match between the two calls.
If anyone has been curious about what is meant by 'Don't communicate by sharing memory, share memory by communicating' this is it, and why.
* respond to PR comments
* make constants
* simplify termination logic
* optimize: simplify stats collection
* overhaul documentation and respond to PR comments
* implement PR requests
* clean up cmaes