Make the counter pattern use its arguments

This is now actually a pattern: it can emit counters of any width.
Add a "merge pattern"

The general idea here is that this sort of pattern merges together
other patterns in order to form a single larger pattern.  I'm kind of
abusing the pattern interface here, but I think it's sane -- probably
I should have called "pattern" a "circuit" and "pattern_factory" an
actual "pattern".

Regardless, this allows me to merge together more than one circuit!