regcomp.c: Move code into a #define

This logic will be used in an additional area of the program in a future
commit.

The #define also generalizes the code so it works on not just 'S' and
's', but any upper/lower case pair of ASCII alphabetics.
PATCH (partial) [perl #107816] Performance regression since 0abd0d78

0abd0d78 removed making tries under /di matching, the reason being that
it was broken for many of the upper Latin1 characters, the ones whose
matches aren't fully known until run-time.  For example under /di, LATIN
CAPITAL LETTER A WITH GRAVE caselessly matches LATIN SMALL LETTER A WITH
GRAVE if and only if the target string is encoded in UTF-8.  Under /ui
matching, these always match, and so tries are constructed for them.

But if a regnode doesn't contain any of the 61 problematic characters (nor
the sequence 'ss' (upper- and/or lowercase), what it matches is fully
known at compile time, and so should be trie-able as-is.

This commit merely keeps track of if any character in the regnode is one
of the 61 or the 'ss' sequence, and if not, changes its type to be /ui
and hence trie-able.