Fixes for the grid search backend for a recent breakage and expansion of its capabilities.
The user supplied lower and upper bounds for the grid search were no longer being scaled via the
scaling matrix.
In addition, the code has been refactored to be simpler and more flexible. The user can now supply
just the lower or just the upper bounds and the grid search will work.