Lexer tweaks+future proofing of test case naming

Tweak the lexer so that it avoids confusing lambdas and char escapes. Add parser support for mid-file pragmas.

Also tweak the test suite naming scheme to be a bit more future proof before it's too late to make that kind of change.