Fix the db ls command so that the json is printed.
Document and implement the replication API, closes #8.

Note that replication document templates are required for perl, python
and ruby, see #28.