When annotating regexp states with the leftmost longest match,
prefer the leftmost even if the end of either match has not
yet been completed.  If two matches start on the same state,
prefer an uncompleted end to a completed one.
Fixes issue #229.