gracefully shutdown the emacs server