Refactor & generalize Michelson peephole framework
This simplifies and generalizes the Michelson peephole framework.
There is one example usage, optimizing strings of length k or DIG/DUG k. In the example contracts this only happens for k <= 3, so there is no change here in the example contracts, but I have seen it for k > 3 in real contracts.
There will be more usages in the future. And I think this version will be easier to port/prove in Coq.