Overhaul packing algorithm

This fixes 2 bugs. One where indexes were mishandled and one where
raw blocks would always be empty.

Also, gofmt
Merge pull request #10 from DanielMorsing/compressorfix

Overhaul packing algorithm