re_intuit_start(): stclass: use rx_origin more

In the stclass code block, we do

    s = rx_origin;
    ... stuff reading the value of s ...
    s = find_byclass(...);

change that to

    ... stuff reading the value of rx_origin ...
    s = find_byclass(...);
re_intuit_start(): use check_ix for efficiency
re_intuit_start(): remove if(check)

It this point in the stclass block, we have already confirmed that an
anchored substring exists and that the check substring is anchored.
So check cannot be null at this point. So don't test for it being null.
re_intuit_start(): reduce use of s in stclass code

s is mainly acting as a stand-in for rx_origin; so just use rx_origin
directly.
re_intuit_start(): eliminate t from stclass code

The 't' variable now just contains a copy of rx_origin; so just use
rx_origin directly, and eliminate t.
re_intuit_start(): eliminate debug-only var

'what' is only defined and assigned to in debugging builds.
Just calculate the value on the fly instead when printing debugging
output. Makes the code less messy.
add test for a code path in intuit_start()

Nothing in the test suite currently triggers *not* taking this branch:

    /* Have both, check_string is floating */
    if (rx_origin + start_shift >= check_at) /* Contradicts floating=check */

So add something that does trigger it.
re_intuit_start(): eliminate one label

Currently the code looks like:

    if (rx_origin + start_shift >= check_at)
        goto retry_floating_check;

    ....

  retry_floating_check:
    rx_origin = check_at - start_shift;
    goto hop_and_restart;

But that conditional only kicks in when the floating substring (which was
the check substring) matched, so this condition always applies:

    rx_origin + start_shift <= check_at

So the condition in the code will only ever be true when

    rx_origin + start_shift == check_at

In this case, this assignment is a noop:

    rx_origin = check_at - start_shift;

So skip it and jump directly to hop_and_restart. This eliminates the
retry_floating_check: label.
re_intuit_start(): swap if/else blocks

Change

    {
        if (cond) {
            A;
            goto x;
        }
        B;
        goto y;
    }

into
    {
        if (!cond) {
            B;
            goto y;
        }
        A;
        goto x;
    }

Should be functionally equivalent, but will allow for some further code
factorisation shortly.
re_intuit_start(): swap another if/else block

Change

    {
        if (cond)
            goto x;
        A;
        goto y;
    }
    x:

into

    {
        if (!cond) {
            A;
            goto y;
        }
    }
    x:

Functionally equivalent, but eliminates one 'goto'.
re_intuit_start(): remove redundant assertion

assert(prog->substrs->check_ix) is within the block
    if (prog->substrs->check_ix == 1)
so it's not needed any more.
re_intuit_start(): swap another if/else block

Change

    {
        ...
        if (has_anchored) {
            A;
            goto restart;
        }
        B;
        goto hop_and_restart;
    }

to

    {
        ...
        if (!has_anchored) {
            B;
            goto hop_and_restart;
        }
        A;
        goto restart;
    }

Functionally the same, but will allow simpler code shortly
re_intuit_start(): swap two blocks, delete label

Change

    if (!have_anchored) {
        A;
        goto hop_and_restart;
    }

    if (check_ix == 1) {
        B;
    }

  hop_and_restart:
    C;

To:

    if (have_anchored && check_ix == 1) {
        B;
    }

    if (!have_anchored) {
        A;
    }

    C;

This change should be functionally equivalent, but eliminates a label.
re_intuit_start(): de-duplicate condition

Change

    if (have_anchored && check_ix == 1) {
        B;
    }

    if (!have_anchored) {
        A;
    }

    C;

To:

    if (have_anchored) {
        if (check_ix == 1) {
            B;
        }
    }
    else {
        A;
    }

    C;

This change should be functionally equivalent, but eliminates calculating
the have_anchored condition twice.
re_intuit_start(): swap BmUSEFUL + stclass blocks

Currently the code that does BmUSEFUL()--, and which and frees the
substring if the count reaches zero, comes before the stclass code. This
is problematic, because by the time the stclass code is executed, the
check substrings may have been freed. The stclass code does have some
checks for this, but they are inadequate: I managed to produce code that
segfaulted. It's also hard to test - you have to run against the same
pattern 100 times to get the BmUSEFUL() count down to zero, then on the
101st attempt, do something that both triggers the decrement/free and
fails the st class.

By moving the BmUSEFUL()-- stuff to *after* the stclass code, it removes
this issue completely.

As to how it affects the BmUSEFUL() count: I think it makes it slightly
better. Before, a substring could match at rx_origin offset 0, triggering
BmUSEFUL()--, then the stclass could fail, triggering a new substring
match at at a non-zero offset, and thus doing BmUSEFUL()++. The overall
affect being neutral. Now, the overall effect is BmUSEFUL += 1, which
better reflects the fact that the substring *did* help us find a non-zero
offset.
re_intuit_start(): always initialise start_shift

The start_shift variable is usually initialised to prog->check_offset_min,
except for one code path where it is left at zero. It turns out that
in that code path, the value isn't (currently) used, so is safe. However,
that may change, so unconditionally initialise it.
re_intuit_start(): trivial reorg of stclass code

make all the actions on success follow the actions on failure,
rather than being partly before and partly after.

No functional changes.
re_intuit_start(): fix a comment about overlap

The comment said that we don't allow the anchored and floating substrings
to overlap. This is trivially wrong, e.g.

/aa+/ has an anchored of "aa" at 0 and a float of "a at 1..inf

Fix the comment to say what the assertion actually already tests for, i.e.
that the float doesn't start before the anchored.
re_intuit_start(): eliminate checked_upto var

This var is supposed to record the latest place that stclass
had rejected, so if we try again, we don't start any earlier than that.
However, an assert showed that nothing in the test suite ever left
checked_upto > rx_origin on re-entry, so we could always use rx_origin
directly.

On failure, checked_upto is reset to HOPBACKc(endpos, start_shift)
where endpoint is the highest char that find_byclass() was asked to search
to. Now, I think that this is a logical error; it should have been
HOPBACKc(endpos, cl_l) or similar; i.e. just hop back the number of chars
equal to the length of the character class; using start_shift just makes
checked_upto artificially too small.

But in either case, consider the following more formal analysis (the
arithmetic below is in terms of chars).

Assume initially at least, that checked_upto <= rx_origin. The question is
whether we can ever end up with checked_upto "overtaking" rx_origin.

Where there is an anchored substring or ml_anch, we have:

    endpos = r_origin + cl_l;
    on failure,
        checked_upto = endpos - (start_shift or cl_l)

    since start_shift should be => cl_l, in either case we end up with
    checked_upto <= rx_origin.

Where there is only a floating substring, we have:

    endpos = r_origin - start_shift + cl_l;
    on failure,
        checked_upto = endpos - (start_shift or cl_l)

    again, since start_shift should be => cl_l, in either case we end up with
    checked_upto <= rx_origin.

Where there are no substrings, we return on failure; so the updating
checked_upto is irrelevant.

On success we return, so again the updating of checked_upto is irrelevant.
re_intuit_start(): fix byte/char calculation err

On failure to find stclass in float range, it currently does:

    rx_origin = check_at - start_shift;

which should instead be

    rx_origin = HOP3c(check_at, - start_shift, strbeg);

The second added test is an example of when this causes a false negative.
(The first test is just the analogue without a UTF8 string, so it already
passes).

Since we actually already calculate this value earlier as part of
determining endpos in the float case, assign the result of that calc to a
local var, then just reuse it.