Change Expr.visitCalls to Expr.searchCalls with different usage.
Factor out matchFinder from Expr.findMatch.
Move matchFinder and Expr.findMatch into theorems.js; make findMatch a function.
Make applyFacts more efficient; clean up some comments.
Fix a test.
Refactor applyFacts.
Move a couple of functions around.
Improve rules.considerPart and use it in applyFactsAtPath.
Create and use new function convertAndReplace.