R=rsc, r CC=golang-dev https://golang.org/cl/4290059
R=golang-dev, nigeltao, niemeyer, r CC=golang-dev https://golang.org/cl/4079053
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev https://golang.org/cl/850041
Fixes #401. R=ken2 https://golang.org/cl/180053