Add test for character class with space in it.
Refactor regex backslash handling to correctly handle character classes.

Now, "\ " isn't incorrectly parsed as unspace (which is illegal in regexes).
Rerefactor backslash handling.

Now, running regex and character classes don't share any code for handling
backslash escapes. This means that there's some code duplication, but it'll
make it easier to change character classes into something like skip lists
later on.