Redex enumerator handles mutually recursive patterns.

Better production sorting, code cleanup and reorganizing some of redex-lib.