Replaced several counted for loops with while loops because for comprehensions are slow for counting.
Removing for comprehensions because they're slow and so are returns inside of them.
Changed for comprehension to foreach.
Added convenience functions for common while-looping constructs. Replaced some for comprehensions with these.
Changed a for comprehension to a seqloop.
Removed dead code and made ACMatcher.tryMatch's loop a breakable while.
Documented looping convenience functions.
Changed seqloop to use countedloop.
Added inline annotation to hashing and looping functions.
Revert "Changed seqloop to use countedloop." for performance reasons.

This reverts commit c9ffc573ed2ebe6c0e14faf055eefa5325958363.