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
Do we need this if we are using Orderly?  We can talk offline since I haven't been following this stuff closely.