Revert "Remove non-submission testing stuff"

This reverts commit 81235d98baa70884fa7e9c1d572c08766f7bd475.
Prevent waiting on another transaction.

This could sometimes occur with previous one or more previous indexes' buffer
locks in the second or subsequent index locked.

In passing, clean-up AM definitions so lock function comes first, just like
everywhere else. Bump catversion.