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
When I was learning scala, the first thing I learned was about Option. so it stuck with me. I think this method signature could be something like this.

def getSchema(slug: String): Option[String] = {}

This way, during pattern matching, your case statement could say "case None" which would be more readable. 

Also I think if the error "case statements" are at the end, it would be more readable, but its possible thats the way my java eyes would expect. So you dont have to change that.