Improve JSON API
Rewrite content models to Python objects

Instead of storing content models as strings with insert points, use
Python objects to model the content.