Remove nasty deadlock in the lock manager.

When acquiring a txn acquires a set of locks, we have to keep all the latches
protecting each lock list latched all the way until we have put the txn in all
lock buckets.