Ensure symmetry in event registration
Created by: davemevans
A number of leaks were occurring around event handlers:
- Missed
.off
in RepresentationController (and also a missed.on
) - Differing scope passed by
.on
and.off
in InsufficientBufferRule - xlinkcontroller was never reset so event handler was left each time