Fix commitment-chain handling of multiple commits.
Implement commit lag limits.

This revealed a number of other problems in the stack, which are also
fixed in this commit.