Fix resize broadcaster so that components can be deregistered before rendering

Close #1245.
Add unit testing to ResizeBroadcaster registration.
Do we want to stick with svg.remove() being placed here or at the end of the test?

(Do we want the svg to stick around even if the test fails?)