Extracted the DocumentListener into a variable
Added equals and hashCode for the DocumentListener

The thing that keeps track of them uses these to check for object
equality. Figured this from the code, not the documentation, as
usual.
Keeping track of the documents and the listeners I registered

Because "IDEA" can't give you that info... And if you try to register
the same listener twice, it will log an error, throw an uncatchable
Throwable and... still registers the listener.

Because hey, if I have an error, let's just keep going... What could
possibly go wrong?
Protecting myself from null documents

It happens if you open a document from the .cope folder. Shouldn't
affect outside people, but better safe than sorry.
Merge pull request #20 from caiusb/listener-fix

Listener fix