CF-345: json schema

Changes to add validation to PreferencesService. Further clean up is necessary. But I would like to submit that to avoid the PR from getting too big to review. 
* Use JSON Orderly API
* Add happy path unit tests for PreferencesService API
We don't need JSON schema. I checked it in just in case we need to go back to it, like when we're overruled by an architect. :-) But I can check it in just on my fork.