Major changes to SDO

- the 'h' function now has to take a cv::Mat. Haven't found a way yet to
make it work with scalars and Mat.
- changed all code to work with multi-dimensional x
- added an callback function that can be specified to calculate the
training error