Bunch of performance improvements

Remove needless allocations etc.

benchmark                         old ns/op    new ns/op    delta
BenchmarkDecodeMessageSmall           38560        35553   -7.80%
BenchmarkDecodeMessageBig             73323        71313   -2.74%
BenchmarkEncodeMessageSmall           25187        15532  -38.33%
BenchmarkEncodeMessageBig             43526        29788  -31.56%
BenchmarkGetSignatureLong              1452         1159  -20.18%