added support for stopping emacs daemon gracefully