Refactor JSONModel to pull some of the schema walking functionality into json_schema_utils.

Cleaned it up to make it a little easier to understand.
Add a workaround for concurrency issues with json-schema