Update transactions to use the same state machine mechanism as tasks (there are still bugs that make the tests turn your CPU into a space heater though)