added edit-server-buffer-closed hook for restoring frame/windows

Added a new hook edit-server-buffer-closed hook which is called after
the text is sent to the client and the buffer is killed.  This hook is
not run in situations where the editing buffer is not killed.  The hook
edit-server-start-hook can be used to save the window configuration
before the edit server was started, and this hook can then be used to
restore the configuration.