Fix resize broadcaster so that components can be deregistered before rendering

Close #1245.
Add unit testing to ResizeBroadcaster registration.
After introducing this variable, does it make sense to check it while deregistering broadcaster in `remove()`?