Rewrite editor to use JSON objects throughout.

Only touch database on load and save. Activity instance is serialized with json, the database is not used.