Allow user to specify own escape-chars
The current set of metacharacters that are escaped when rendering are
based on Java's Pattern implementation, which for the purposes of this
library, is basically PCRE.
However, different regular expression implementations sometimes have
different pattern metacharacters. Vim's very-magic mode, for instance,
reserves all [^a-zA-Z0-9_] ASCII characters, while POSIX basic regular
expressions¹ do not use (, ), ?, +, or | (these must be preceeded by a
backslash to attain their now familiar meaning).
This patch adds the :escape-chars option to pattern and string-pattern
to allow the user to specify this set of metacharacters. The value of
:escape-chars may also be a key in the (public) metacharacters map.
The actual implementation is done through a dynamic var, following the
precedent of *capture*.
¹ Note that we must also allow the user to control the characters used
for capturing/non-capturing groups, alternation, optional matching,
etc, in order to make frak work for POSIX BREs