Added hasEventListener to EventTarget. Improved cleanup within loaders.

Loaders don't dispatch events that no one listens to. Event listeners
are removed from loaders.