Backup from new SDM code:

- Added unit tests
- Factored out regulariser
- SDO templated on RegressorType
- SDO predict function, test function simplified