Allow garbage collection for instances that are removed / deleted

Hello,

I use wavesurfer on an angular project, and it seems that waveform instances are not garbage collected due to the window.resize handler which is an anonymous function. So I give it a name.
I also add un unregisterEvents method to waveforme that clean registered events handler, in order to avoir memory leaks.

Hope you find it useful.

Lionel