Added lexerDestroy() function.

The lexer is now dynamically created and freed.