Group tests by purpose

As I add more tests, this will help me keep the organized.
Improve error for invalid regex

The old code displayed the faulty pattern as a list of codes.  That's
pretty much useless.  Display it as an atom instead.
Support ? meta character
Tidy up whitespace in engine
Rework and rename rematch1/4

The new name is engine_match/4, which suggests that it's a matching
primitive performed by the engine.  Other engines will provide their own
implementations of this predicate.

I also reworked the predicate using DCG notation.  Most of the predicate
rules operate on difference lists.  Except for the 'group' rule, there's
really no reason to explicitly name the difference list variables.  This
style also makes the regular expression logic easier to follow.
Support {n,m} syntax
Implement *, + and ? with {n,m}

The first three are really just syntactic sugar for the final,
generalized form.  This simplifies the code meaningfully.
Add some documentation

The documentation's syntax section is inspired by re2's documentation.
It's the most succinct, understandable regex summary I know of.
Support ^ meta character

Matching a regular expression against the string's beginning used to be
the default behavior.  Now one must request it with the ^ character.
Other patterns are allowed to match anywhere inside the string.
Implement some Perl character classes

This omits a few of the really obscure ones which I've never seen used
in the real world.
Implement case-insensitive matching

One can now specify case-insensitive matching by appending /i to a
pattern.  This commit is so large because it creates all the
infrastructure necessary for handling regular expression options.  Both
the parser and interpreter (engine) need access to the options to
perform their work.
Remove superfluous [] wrapper on re_metachar/1

All the lists were singletons.  Removing the wrapper should help the
indexer and give slightly better performance on this code path.
Document flags

I decided to include a flag example in the Synopsis as that seems the
most convenient place to highlight an example.  Hopefully users realize
that they can omit the /i to get default behavior.

Anyway, I'll cover most of this in more depth in the documentation eventually.
Support /s option

This also fixes a bug where `.` used to match any character, including
newline.  It now matches newline only when /s option is present.