added database export routine

export the database to json.
this will make it easy to import existing data into a new object model,
which will be totally refactored from the existing one. i think this is
better than using south to migrate (which would require lots of
incremental small steps).