internals: Add a custom function to close Emacs or the current frame.

This change is introduced to some of the following ideas:
 - Sometimes, when editing on a server process, running `kill-emacs`
   will destroy buffers that were meant to be left running (e.g. if
   editing multiple projects on the same Emacs instance, all of the
   other projects would be closed)

 - Running in a different frame and calling `kill-emacs` (which is what
   C-x C-c does in Emacs 24.4 to my observation) will kill the entire
   Emacs instance, which may be bad if in a similar scenario to the
   previous point.

So, the following logic is introduced:
 - If there is more than one frame, run `delete-frame` (do not kill the
   Emacs session).

 - If server-process is non-nil, run `delete-frame` (do not kill the
   Emacs session).

 - If there is one frame (i.e. (frame-list) has length 1) and
   server-process is nil, run `kill-emacs`.

This is open to improvement in the future. Error handling to ensure that
Emacs gets killed even if there is an error with any of the introduced
code would definitely be a good improvement.
Merge branch 'master' of https://github.com/krye/dot-files

Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
internals: Add error handling to custom Emacs closer.

Emacs will now close, even if any errors are thrown.