Use typedef for std::basic_string in trivstring

This fixes compilation for llvm-gcc-4.2 on OS X and makes the code a bit more
readable.
Test invalid sanitizeLatexOption() input as well
Get rid of regex_constants::match_partial

As shown by the unit test this is not needed at all, even not for really
awkward input.