unicode/utf8: added benchmarks
unicode/utf8: added benchmarks

Cover some functions that weren't benched before and add InString
variants if the underlying implementation is different.

Note: compare (Valid|RuneCount)InString* to their (Valid|RuneCount)*
counterparts. It shows, somewhat unexpectedly, that ranging over
a string is *much* slower than using calls to DecodeRune.

Results:
In order to avoid a discrepancy in measuring the performance
of core we could leave the names of the string-based measurements
unchanged and suffix the added alternatives with Bytes.

Compared to old:
BenchmarkRuneCountTenASCIIChars-8        44.3          12.4          -72.01%
BenchmarkRuneCountTenJapaneseChars-8     167           67.1          -59.82%
BenchmarkEncodeASCIIRune-8               3.37          3.44          +2.08%
BenchmarkEncodeJapaneseRune-8            7.19          7.24          +0.70%
BenchmarkDecodeASCIIRune-8               5.41          5.53          +2.22%
BenchmarkDecodeJapaneseRune-8            8.17          8.41          +2.94%

All benchmarks:
BenchmarkRuneCountTenASCIIChars-8           	100000000	        12.4 ns/op
BenchmarkRuneCountTenJapaneseChars-8        	20000000	        67.1 ns/op
BenchmarkRuneCountInStringTenASCIIChars-8   	30000000	        44.5 ns/op
BenchmarkRuneCountInStringTenJapaneseChars-8	10000000	       165 ns/op
BenchmarkValidTenASCIIChars-8               	100000000	        12.5 ns/op
BenchmarkValidTenJapaneseChars-8            	20000000	        71.1 ns/op
BenchmarkValidStringTenASCIIChars-8         	30000000	        50.0 ns/op
BenchmarkValidStringTenJapaneseChars-8      	10000000	       161 ns/op
BenchmarkEncodeASCIIRune-8                  	500000000	         3.44 ns/op
BenchmarkEncodeJapaneseRune-8               	200000000	         7.24 ns/op
BenchmarkDecodeASCIIRune-8                  	300000000	         5.53 ns/op
BenchmarkDecodeJapaneseRune-8               	200000000	         8.41 ns/op
BenchmarkFullASCIIRune-8                    	500000000	         3.91 ns/op
BenchmarkFullJapaneseRune-8                 	300000000	         4.22 ns/op

Change-Id: I674d2ee4917b975a37717bbfa1082cc84dcd275e
Reviewed-on: https://go-review.googlesource.com/14431
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

rachtsingh/gogojuice,polyverse-security/go,josharian/go,vsekhar/elastic-go,roth1002/go,goodlang/good,derekmarcotte/go,momchil-velikov/go,CAFxX/go,Endika/go,mwhudson/go,cloudflare/go,polyverse-security/go,malvira/go,Samurais/go,cloudflare/go,ImJasonH/go,deft-code/go,roth1002/go,CAFxX/go,CAFxX/go,nawawi/go,sndnvaps/go,Endika/go,ImJasonH/go,Jordanzuo/go,derekmarcotte/go,rachtsingh/gogojuice,roth1002/go,golang/go,ganboing/go-esx,fjballest/golang,ImJasonH/go,golang/go,derekmarcotte/go,ganboing/go-esx,CAFxX/go,binarycrusader/go,polyverse-security/go,cyberroadie/go,goodlang/good,Samurais/go,linux-on-ibm-z/go,goodlang/good,momchil-velikov/go,momchil-velikov/go,suncycheng/go,akutz/go,theif519/go,vanloswang/go,sndnvaps/go,momchil-velikov/go,linux-on-ibm-z/go,momchil-velikov/go,momchil-velikov/go,kim-racktop/go,cyberroadie/go,cyberroadie/go,derekmarcotte/go,josharian/go,golang/go,akutz/go,derekmarcotte/go,codestation/go,binarycrusader/go,linux-on-ibm-z/go,vanloswang/go,binarycrusader/go,deft-code/go,gdey/go,mwhudson/go,theif519/go,odeke-em/go,cloudflare/go,golang/go,miolini/go,fjballest/golang,ImJasonH/go,malvira/go,sndnvaps/go,ganboing/go-esx,gdey/go,kim-racktop/go,vanloswang/go,nawawi/go,rachtsingh/gogojuice,vsekhar/elastic-go,CAFxX/go,cloudflare/go,Samurais/go,Endika/go,rachtsingh/gogojuice,vanloswang/go,kim-racktop/go,odeke-em/go,cloudflare/go,4ad/go,suncycheng/go,momchil-velikov/go,malvira/go,CAFxX/go,suncycheng/go,malvira/go,binarycrusader/go,linux-on-ibm-z/go,vsekhar/elastic-go,kim-racktop/go,linux-on-ibm-z/go,kim-racktop/go,deft-code/go,sndnvaps/go,binarycrusader/go,josharian/go,Jordanzuo/go,Endika/go,linux-on-ibm-z/go,roth1002/go,gdey/go,vanloswang/go,Cofyc/go,Jordanzuo/go,theif519/go,cyberroadie/go,odeke-em/go,kim-racktop/go,derekmarcotte/go,josharian/go,malvira/go,polyverse-security/go,roth1002/go,4ad/go,cyberroadie/go,miolini/go,ganboing/go-esx,polyverse-security/go,fjballest/golang,Endika/go,josharian/go,codestation/go,akutz/go,sndnvaps/go,Samurais/go,cloudflare/go,Endika/go,suncycheng/go,nawawi/go,binarycrusader/go,suncycheng/go,vsekhar/elastic-go,derekmarcotte/go,Samurais/go,roth1002/go,polyverse-security/go,vsekhar/elastic-go,codestation/go,gdey/go,miolini/go,miolini/go,Samurais/go,rachtsingh/gogojuice,4ad/go,linux-on-ibm-z/go,josharian/go,odeke-em/go,Jordanzuo/go,roth1002/go,nawawi/go,4ad/go,Endika/go,cyberroadie/go,golang/go,ganboing/go-esx,polyverse-security/go,CAFxX/go,ganboing/go-esx,Cofyc/go,Samurais/go,cloudflare/go,gdey/go,binarycrusader/go,suncycheng/go,gdey/go,malvira/go,akutz/go,mwhudson/go,golang/go,theif519/go,ganboing/go-esx,momchil-velikov/go,rachtsingh/gogojuice,kim-racktop/go,goodlang/good,goodlang/good,derekmarcotte/go,polyverse-security/go,deft-code/go,Cofyc/go,akutz/go,odeke-em/go,vsekhar/elastic-go,akutz/go,ganboing/go-esx,theif519/go,mwhudson/go,goodlang/good,sndnvaps/go,linux-on-ibm-z/go,miolini/go,Endika/go,goodlang/good,vanloswang/go,Cofyc/go,fjballest/golang,4ad/go,fjballest/golang,cyberroadie/go,deft-code/go,mwhudson/go,cloudflare/go,Jordanzuo/go,binarycrusader/go,ImJasonH/go,fjballest/golang,gdey/go,deft-code/go,mwhudson/go,ImJasonH/go,vanloswang/go,vsekhar/elastic-go,vsekhar/elastic-go,malvira/go,roth1002/go,rachtsingh/gogojuice,suncycheng/go,gdey/go,theif519/go,ImJasonH/go,mwhudson/go,mwhudson/go,Jordanzuo/go,odeke-em/go,josharian/go,CAFxX/go,miolini/go,deft-code/go,fjballest/golang,miolini/go,Samurais/go,sndnvaps/go,odeke-em/go,4ad/go,codestation/go,nawawi/go,codestation/go,4ad/go,josharian/go,Jordanzuo/go,akutz/go,vanloswang/go,fjballest/golang,suncycheng/go,codestation/go,nawawi/go,kim-racktop/go,Cofyc/go,Cofyc/go,odeke-em/go,ImJasonH/go,golang/go,miolini/go,rachtsingh/gogojuice,deft-code/go,goodlang/good,4ad/go,Cofyc/go,malvira/go,theif519/go,cyberroadie/go,nawawi/go,Jordanzuo/go,sndnvaps/go,Cofyc/go,nawawi/go,codestation/go,christopher-henderson/Go,codestation/go,golang/go,akutz/go,theif519/go