Fix resize broadcaster so that components can be deregistered before rendering

Close #1245.
Add unit testing to ResizeBroadcaster registration.
Just noting that I think this is the first time I've seen a before, after, beforeEach, afterEach block used to my liking.