Begin reworking core serialization
Change serialization format so we don't have so much nesting

It is also partially compatiable with Json.NET
Don't emit $id keys if there is no associated $ref key

Also fix too much type information being emitted for object references
Support versioning