Portability: Fixes to make 'gcc -pedantic' happy.

Apparently, byte-sized bit fields are a gcc extension, so the bit field
has been converted to a plain unsigned char, and some inline functions
have been added to make access to the "bitfield" somewhat legible.

Also, "%zu" printf format specifiers (for size_t) are apparently unloved.
They have been replaced by "%lu".