JSON-relational mapping. You saw it here first.

First comprehensive re-write of json2sql. It's still ugly and full of
ad-hoc handling of event data, but it's better. Next step would be to
make the type mapping work with the abstractions provided by SQLAlchemy
rather than fight them :).

And yes, this needs tests. Lots of tests. Working on that too.

Change-Id: I422f6a74348f6d413ea3e836beea7b585e88bde9