Added template_parser_trim_parse_tree() function.

To start, template_parser_trim_parse_tree() removes BEGIN and END terminals.