Fixed analyzer warnings and memory management issues

There were a lot of places in the code that were not properly retaining
objects upon allocation. This was causing many crashes for me.
Fixed some crashers relating to notifications

We were setting up notifications in places where methods were being swizzled.
It is important that we unregister for these notifications when the swizzled
object is about to be deleted.
Fixed occaisional crash when changing files
Fixed occaisional crash with switching between editors

We were only deregistering the observer if the editor type was the source code
editor. I moved the unregister logic to the superclass hook.