Use ArrayStack for tracking accumulation in tailrec folding

Improves performance substantially
Add MutableIdentityMap
rewrite: extract parameters from literals