Separate MATCH_SEARCH and BG_MATCH_SEARCH completely

These two interfaces do two very different types of matching, and
BG_MATCH_SEARCH does not really need to include MATCH_SEARCH.

This will be more important when BG_MATCH_SEARCH takes a completely
different pattern argument (in later commits).
Encapsulate bbox operations for matching in a structure

BBOX_OPERATOR is used by the matching code to do the necessary
operations on the pattern graph; indeed, for the outer loop of the
greedy matcher, it essentially replaces the pattern.

The idea of this is that we don't have to necessarily record the
changes.  Instead, we can just operate on both sides of a rule at once,
but without the matching code even knowing what a rule is.