Cache fetched Tree objects in the Commit object

Tree objects are created by running "git ls-tree" and parsing the
output.  When repeated many times, this can be somewhat expensive,
so cache the Tree objects.

One situation in which this cache can be very effective is when a
user submits a batch containing many comments or replies in a review
with many recipients.  A separate email is generated for each
recipient, and in each email, a call to Commit.getFileEntry() will
be made for each comment.  Commit.getFileEntry() in turn fetches
the Tree object representing the directory containing the requested
file.

It is possible to optimize this in many other ways, some "better" in
the long term, but this is a simple and very effective quick fix.