encoding/binary: speed up writing slices of integers

Simple approach. Still generates garbage, but not as much.

benchmark                        old ns/op    new ns/op    delta
BenchmarkWriteSlice1000Int32s        40260        18791  -53.33%

benchmark                         old MB/s     new MB/s  speedup
BenchmarkWriteSlice1000Int32s        99.35       212.87    2.14x

Fixes issue 2634.

R=golang-dev, crawshaw
CC=golang-dev
https://codereview.appspot.com/12680046