Adding variable length integer encoding to ShuffleSerializer.

Also, some minor style cleanup.