regcomp.c: Remove useless code

This code sets a variable on the C stack, and two statements later
returns, throwing away that variable without ever using the new value.
regcomp.c: Extract code into function

The code to parse the flags that occur after in '(?foo)' and
'(?foo:bar)' is extracted into a function; some comments were added.
This is in preparation for this to be called from an additional place
regcomp.c: Combine duplicated code
regcomp.c: Slight refactoring for clarity

This code was confusing enough that until a couple of commits ago, there
was a useless setting of a local variable.
Incorporate code review feedback for (?[])

Thanks to Hugo van der Sanden for reviewing this new code.
Add interpolations to regex sets

This commit adds the capability for '(?[ ])' to contain interpolated
variables from other '(?[ ])' constructs.  A set operation can thus be
built up from the composition of other ones, without having to worry
about precedence, etc.

Thanks to Aaron Crane for suggesting this.