SI-7708 - Improve Bitset foreach performance

1. Switched inner for loop for a while loop to enable early exit when bitset
is sparse.

2. Switched outer for loop for while loop for performance.

3. Changed WordLength and friends to final for performance.

New version runs in 60% of time of old on dense bitsets, faster if highly
sparse.  No tests committed (requires performance testing framework).