Changed TransactionManager to locally cache results.

TransactionManager now just hooks a TransactionCache into Django's transaction
system.

TransactionCache provides a local read cache for gets. This can reduce the
number of backend requests significantly, but must be flushed after each
request.

TransactionCache also supports get_many() and set_many().
Updated get_multi_generation() to use get_many().

get_multi_generation() looks up the current generation of multiple tables.
This change uses TransactionCache's read caching and get_many() support
to look up the required generations in one backend request.