Write TPR body as opaque XDR data in big-endian format
This implements support for opaque data in our serializers,
as well as a few missing XDR support opaque routines,
including support for data objects larger than 2GB.
By using this for the new serialization of the TPR body
we avoid the unintended 4x growth of the file size, and
avoid introducing extra endian swapping or padding.
We also adjust the endian so the InMemorySerializer
swaps to big endian (i.e., swap if host is little endian)
such that the body of the TPR file is compatible with
the header that is already written as big-endian by
the XDR routines.
Fixes #3276.
Change-Id: I99011dffe190155e671bd656127c2a33459923e2