slightly speeded up committing and retrying nested transactions
implemented BEFORE-COMMIT, CALL-BEFORE-COMMIT, AFTER-COMMIT, CALL-AFTER-COMMIT
  and added their tests