Optionally attach namespace to a db session to avoid unnecessary queries.

A surprising fraction of mailsync's performance cost comes from lazy-loading
a namespace instance in various places. In principle, we don't need to do this,
because the namespace object is effectively immutable, and we already know what
it has to be.

This commit adds the option to 'attach' a namespace to a database session. This
is really not an option for general use, since you must take great care not to
make wrong assumptions about which namespace your objects actually belong to.
But it lets us make significant performance gains.

Needs a corresponding EAS change to pass the right arguments around
(forthcoming).
[SCHEMA] Simplify transaction log construction.

Instead of storing an ORM-derived 'delta', only store a snapshot of the API
representation of the versioned object. This reduces the volume of data we
store, makes constructing the transaction faster, and removes a bunch of
complexity left over from when we were trying to infer syncback actions from
the transaction log.