Correct a bunch of problems in lexer_fun.

Mostly to do with primes and type variables, but also including some
token misidentifications.
Define a tokens->ast parseDecls function in mmlParseTheory.
Define an isWhitespaceT predicate.
New stringAST function to turn a string into a list of ML declarations.