Simplify pattern matching implementation

Remove template-based pattern matching implementation.  The removed code is too
complex and as a result too hard to maintain in the long run. Also, the main
use case for wildcards is `others()`. Other use cases seem rare (and often
unlikely) and thus do not justify the optimizations in the first place..