represent slices with length in elements, not bytes

The goal here is to avoid requiring a division or multiplication to compare against the length. The bounds check previously used an incorrect micro-optimization to replace the division by a multiplication, but now neither is necessary.

I wanted to to optimize the pre-optimized code too... but ran into a strange memory leak in `match_.rs`. I'll tackle that part separately.