sqlasync: Fix bug with handling of COMMIT result and transaction state