tabletserver: refactor transactions