Total overhaul of REST and object model

Pretty much a top to bottom rewrite of the entire project. Introduces a
new object model, storage abstraction layer, schema validation and
reorganizes much of the codebase.