Added JOHNNY_PREFETCH_GENERATIONS setting (default True).

When this feature is enabled the current generation of all tables
if looked up at the start of each request. This is done with a
get_many, so is a single backend request rather than the multiple
requests used to look up generations on an as needed basis.
Fixed TransactionCache tests.