emacs: add patch for memory leaks

This patch fixes a memory leak in Emacs 24.3 on Mavericks.
Mostly from an upstream patch r114945 in trunk, to be released as 24.4.
https://gist.github.com/anonymous/8553178

Even though the patch is applied to files which are also modified by
existing patches in the original Formula, it is confirmed that the patch
can applied without errors (Hunk successfully).