Implement clean ^C shutdown and add the stop RPC.

Closes #69.