fix ' haxe.Template can't parse "$$a($$b(a, b))" ' and add tests
Merge pull request #2796 from shohei909/fix-template

Fix haxe.Template macro parsing