Create a ChangeCache for ChangeDetails in ChangeScreen

Create a ChangeCache as a general place to hold client
side data about changes.  Having a common place to store
change data will allow multiple UI widgets to refer to
the same data without having to be connected to or aware
of other widgets.  In this change, the ChangeCache only
holds ChangeDetailCaches, but in the future it may hold
more Change data.  Combining all Change related objects
into a single ChangeCache and placing them in a Map
allows efficient combined lookups by Change over placing
each separate data type into its own Map.

ChanegDetailsCaches are also new in this change and can
hold a ChangeDetail while being listened to.  A
ChangeDetailCache will inform its listeners when a new
ChangeDetail is loaded into the cache.

Make the ChangeScreen listen to the ChangeDetailCache
and update itself when the ChangeDetail changes.  This
gives components another way to tell a ChangeScreen to
update itself without having to hold a reference to the
ChangeScreen, and without actually even having any
knowledge that such a screen even exits. This will allow
current and new UI sub or super components to be more
independent from a ChangeScreen.

The current way to update the ChangeScreen's ChangeDetail
is for widgets to hold a reference to the ChangeScreen
and to call its update() method with a ChangeDetail.
While this change introduces the ability to update a
ChangeScreen via the ChangeDetailCache, this new method
is only used internally so far (onLoad), no external
components use this facility yet.

To use this feature, components need only grab a
ChangeDetailCache from the ChangeCache for the current
Change, and then update the ChangeDetailCache with a
call to set(ChangeDetail).  Or more likely, if they need
to make an RPC call which will return a ChangeDetail,
they may statically obtain a GerritCallback from the
ChangeDetailCache class which knows how to update the
appropriate ChangeDetailCache for them directly.  Both
of these approaches will enable any listeners to the
ChangeDetail value to be aware that they need to update
themselves to the new value of the ChangeDetail.  The
ChangeScreen is now such a listener and does exactly
that.

Change-Id: Iaa0a9a2faece760f3b54f6e204f268d9d6ef2c5b
3 files changed