Fix resize broadcaster so that components can be deregistered before rendering

Close #1245.
Add unit testing to ResizeBroadcaster registration.
is the test name for like "components are not registered if autoResize set false" or similar?