text/template: improve lexer performance in finding left delimiters.
text/template: improve lexer performance in finding left delimiters.

The existing implementation calls l.next for each run up to the next
instance of the left delimiter ({{).  For ascii text, this is multiple
function calls per byte.  Change to use strings.Index to find the left
delimiter.  The performace improvement ranges from 1:1 (no text outside
of {{}}'s) to multiple times faster (9:1 was seen on 8K of text with no
{{ }}'s).

Change-Id: I2f82bea63b78b6714f09a725f7b2bbb00a3448a3
Reviewed-on: https://go-review.googlesource.com/24863
Reviewed-by: Rob Pike <4dc7c9ec434ed06502767136789763ec11d2c4b7@golang.org>
Run-TryBot: Rob Pike <4dc7c9ec434ed06502767136789763ec11d2c4b7@golang.org>

christopher-henderson/Go,akutz/go,vsekhar/elastic-go,linux-on-ibm-z/go,akutz/go,CAFxX/go,CAFxX/go,nawawi/go,goodlang/good,codestation/go,akutz/go,Cofyc/go,josharian/go,derekmarcotte/go,linux-on-ibm-z/go,polyverse-security/go,goodlang/good,codestation/go,codestation/go,nawawi/go,josharian/go,akutz/go,josharian/go,derekmarcotte/go,vsekhar/elastic-go,cloudflare/go,Cofyc/go,ImJasonH/go,polyverse-security/go,akutz/go,akutz/go,linux-on-ibm-z/go,cloudflare/go,vsekhar/elastic-go,suncycheng/go,ImJasonH/go,derekmarcotte/go,goodlang/good,ImJasonH/go,golang/go,suncycheng/go,polyverse-security/go,codestation/go,nawawi/go,momchil-velikov/go,nawawi/go,nawawi/go,Cofyc/go,derekmarcotte/go,derekmarcotte/go,polyverse-security/go,suncycheng/go,josharian/go,akutz/go,vsekhar/elastic-go,vsekhar/elastic-go,codestation/go,momchil-velikov/go,polyverse-security/go,CAFxX/go,josharian/go,nawawi/go,josharian/go,golang/go,vsekhar/elastic-go,momchil-velikov/go,cloudflare/go,goodlang/good,cloudflare/go,polyverse-security/go,golang/go,goodlang/good,linux-on-ibm-z/go,suncycheng/go,golang/go,golang/go,Cofyc/go,ImJasonH/go,golang/go,vsekhar/elastic-go,Cofyc/go,goodlang/good,derekmarcotte/go,cloudflare/go,akutz/go,goodlang/good,nawawi/go,Cofyc/go,Cofyc/go,ImJasonH/go,goodlang/good,momchil-velikov/go,ImJasonH/go,momchil-velikov/go,polyverse-security/go,josharian/go,CAFxX/go,CAFxX/go,nawawi/go,golang/go,Cofyc/go,CAFxX/go,suncycheng/go,linux-on-ibm-z/go,momchil-velikov/go,codestation/go,suncycheng/go,momchil-velikov/go,cloudflare/go,codestation/go,suncycheng/go,suncycheng/go,ImJasonH/go,josharian/go,CAFxX/go,linux-on-ibm-z/go,cloudflare/go,momchil-velikov/go,vsekhar/elastic-go,cloudflare/go,derekmarcotte/go,derekmarcotte/go,ImJasonH/go,polyverse-security/go,CAFxX/go,linux-on-ibm-z/go,codestation/go,linux-on-ibm-z/go,golang/go