Add a document switching event.

When Documents are switched, trigger an event which can be used by the
selection nodes to clear their collections.