externalized packing from protocol

Packing is now isolated into it's own package since the default xdr packing
is lacking for future purposes and should at some point be replaced.

This commit aims to make it easier to experiment with alternative packing
methods.
cleaned up lambda mess with field types

Made concrete types with specific 'pack' and 'unpack' methods in favor of the
lambda-based implementation.

This aims to offer the same amount of flexibility but improve clarity.
fixed protocol.py indentation and whitespace issues