Maintain the trigger cache after reconfiguring

A previous change removed the trigger cache cleanup.  When Zuul
is live-reconfigured, it creates new Project objects and
attaches them to all changes currently in pipelines.  Because
the cache contained changes outside of pipelines, those changes
were not being updated with new Project objects.

This restores the maintainCache method and uses it during the
reconfigure event to clear the cache of all changes not currently
in pipelines.  This corrects the error introduced by the previous
change as well as gives Zuul an opportunity to release unused
memory (as now the cache will at least be emptied on each
reconfiguration).

The project-change-merged test is updated to explicitly test this
situation.

Change-Id: I67736fca08f2e14ab733bd9f143820da19839ef9
3 files changed