go.ext/locale: added a function for the common pattern [n<<2:][:4] and
changed some of the functions to take the index as an argument so that
testing functions do not need to modify global variables.

R=r
CC=golang-dev
https://golang.org/cl/8357044
2 files changed