writer: add more meaningful benchmark

BenchmarkWrites 20000 95305 ns/op 42.98 MB/s
writer: remove io.Writer

Removing it allows code to be optimized for the common use-case
writer: fix invalid little endian 64-bit writes and add tests against it
writer: add better benchmarks

BenchmarkBigEndianPutUint32Align1       100000   25301 ns/op   161.89 MB/s
BenchmarkBigEndianPutUint32Align32      200000   12590 ns/op   325.32 MB/s
BenchmarkBigEndianPutUint64Align1       100000   22871 ns/op   179.09 MB/s
BenchmarkBigEndianPutUint64Align32      100000   17090 ns/op   239.66 MB/s
BenchmarkBigEndianPutUint64Align64      200000   13650 ns/op   300.06 MB/s
BenchmarkLittleEndianPutUint32Align1     50000   37862 ns/op   108.18 MB/s
BenchmarkLittleEndianPutUint32Align32   100000   20271 ns/op   202.06 MB/s
BenchmarkLittleEndianPutUint64Align1     50000   33161 ns/op   123.52 MB/s
BenchmarkLittleEndianPutUint64Align32   100000   25181 ns/op   162.66 MB/s
BenchmarkLittleEndianPutUint64Align64   100000   21191 ns/op   193.29 MB/s
writer: store current index rather than last error
writer: add helpers
writer: manually inline flushCache for better performance

benchmark                                  old ns/op    new ns/op    delta
BenchmarkBigEndianWriteUint32Align1            25291        19551  -22.70%
BenchmarkBigEndianWriteUint32Align32           13020        10645  -18.24%
BenchmarkBigEndianWriteUint64Align1            21741        18631  -14.30%
BenchmarkBigEndianWriteUint64Align32           17040        14280  -16.20%
BenchmarkBigEndianWriteUint64Align64           14040        11580  -17.52%
BenchmarkLittleEndianWriteUint32Align1         34821        25211  -27.60%
BenchmarkLittleEndianWriteUint32Align32        20691        18331  -11.41%
BenchmarkLittleEndianWriteUint64Align1         32081        25561  -20.32%
BenchmarkLittleEndianWriteUint64Align32        24971        22111  -11.45%
BenchmarkLittleEndianWriteUint64Align64        21711        19531  -10.04%

benchmark                                   old MB/s     new MB/s  speedup
BenchmarkBigEndianWriteUint32Align1           161.95       209.50    1.29x
BenchmarkBigEndianWriteUint32Align32          314.57       384.76    1.22x
BenchmarkBigEndianWriteUint64Align1           188.40       219.85    1.17x
BenchmarkBigEndianWriteUint64Align32          240.36       286.82    1.19x
BenchmarkBigEndianWriteUint64Align64          291.72       353.69    1.21x
BenchmarkLittleEndianWriteUint32Align1        117.63       162.47    1.38x
BenchmarkLittleEndianWriteUint32Align32       197.96       223.45    1.13x
BenchmarkLittleEndianWriteUint64Align1        127.67       160.24    1.26x
BenchmarkLittleEndianWriteUint64Align32       164.03       185.24    1.13x
BenchmarkLittleEndianWriteUint64Align64       188.66       209.72    1.11x
reader: add bit reader