[ticket/12581] Use the proxy pattern for the template lexer

https://tracker.phpbb.com/browse/PHPBB3-12581

PHPBB3-12581
updated