Moved from success/failure/finish to prepare/commit/rollback for the transaction context, paving the way for 2pc futher down the road.
Fixes and integration tests for tx state for index queries.