Add a destroy function to properly free the lexer