improved the algorithm that compiles rules for fast rewriting
minor refactoring
improved indexing algorithm by only traversing the subject term to retrieve indexing pairs when the cell structure has been modified in previous rewrite step
fixed failing tests
Merge pull request #901 from yilongli/reduce-indexing-time

Reduce indexing time