Fix lmsSubstringLength1 function.

The purpose and return value is the same as lmsSubstringLength0, but we
need to adapt for the S-type characters being bit-flipped.
Replace O(n^2) lookback loop in recursive calls.

In Stages 1 and 4, step 2 requires putting LMS substrings into buckets
from the end to the tail. At any point, we know where the tail is based
on S. The old code simply searched backwards to find the next empty slot
in the bucket, but this is O(n^2). Instead, we reuse the trick from
induceSortS1 to keep the bucket size as a counter in the tail of the
bucket, adjusting buckets as governed by the description in section 4.2
of the paper.
Add an extra test and a simple benchmark.