DESC
Fix partial unlocking in jtrans_commit().
EDESC
Nowadays, we unlock operations as we commit them. However, this could lead to
potential issues if we have an error in the middle of a commit when a
partially-overlapping transaction gets in the way.

The problem is that rollback gets done without locking because it assumes the
operations are already locked (by the caller commit), but in the case of
partially applied transactions they won't be, so it allows another transaction
to step into, leaving things in an inconsistent state.

This also leads to recovery and ordering problems.

The patch fixes this by doing all unlock at once, after the transaction has
been decided.
