Add cancelling server commands

Be very careful with this -- don't block the stop command unless you
really hate yourself.