Replace autoflush with basic entity group transaction support

As an optional feature the database may implement entity group
transaction semantics, where a transaction can be started on a
single root entity (e.g. a Change object in Gerrit Code Review),
reads or updates applied, and later the transaction committed.
This feature better supports a database like Google AppEngine
where the entity group transactions are relatively slow.

Change-Id: I740dfbf6902e403347fd1838aee83271500e0c30
8 files changed