Fix bug with updates to collection view while not onscreen yet

Trying to animate changes to the collection view if it doesn't have a window (isn't on screen) results in an exception.

This fixes a recurrent bug with initializing a data source in `viewDidLoad` before the collection view has a chance to lay itself out at least once.