Fix #381 - provide way to trigger clean shutdown from command line.

I've used a slightly modified version of what Brian suggested, and it does basically what I wanted.  In the process I found that we can't rely on node-redis' `quit` command to fire its callback all the time.