Implement writing modified databases to disk.

* Added config operation: config.databases.add_writable_database(path).
* Write databases as CSV files, using renames for atomicity.
* 'DatabaseModel' class is introduced to associate the record list with
  the original filename.
* Implement server-side writability checks.
* Fix infinite (async) loop in client handling of updates made while an
  update request is pending.