Clarify the different states a transaction can be in: running or idle, with an ID and/or with a snapshot.  Allocate an ID just before we log the first update.  Also allocate a transaction ID in the extension API, for extensions that require one.