[TableGen][GlobalISel] Refactor optimizeRules related bit to allow code reuse

In theory, reapplying optimizeRules on each group matchers should give
us a second nesting level on the matching table. In practice, we need
more work to make that happen because all the predicates are actually
not directly available through the predicate matchers list.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321025 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed