Fix a leak in lexer state upon encountering invalid tokens in a type

This also fixes a class of  memory leaks when failing PHPDoc compilation
on invalid type annotations.