Refactor the IO server part of the RPC.

This fixes a number of problems, such as

  * commands being interrupted by SIGTERM/SIGINT, leaving data in inconsistent state;
  * processes forked off for persistence purposes trashing the process table with zombies;
  * the automatic dumper creating a new thread every. fucking. time;
  * the code being honestly awful.

OK, the first of these problems is purely theoretical, as --nobody posts on the only instance
of this engine-- ideally, the view server is shut down well before the database is.
(Which is not the case with my OpenShift scripts, by the way.) The second "problem"
is barely noticeable, and the third is complete bullshit. The fourth, however,
was actually pretty severe. Nothing a bunch of comments couldn't fix, though.