Revised simulated_annealing() to maintain a trace object

Cleaned up namespace handling
Started an automatic test suite
Cleaned up Nelder-Mead code
Revised Newton's method
Updated naive gradient descent code
Updated L-BFGS code
Revised optimize() interface
Updated grid_search() test
Updated BFGS and cleaned up tests