Avoid non-portable usage of bit fields

Don't use bit fields to access specific bits in the packet header. The
bit order in bit fields depends on the compiler and platform. Therefore,
bit fields cannot be used for portable bit access.

Use shifting and masking instead to access bits in the packet header.
Detect and handle big endian byte order
Move log level check into logging macros

This allows to avoid function calls for disabled log levels completely.

Also include the category name into the log messages.
Show UIDs in log messages in Base58
windows: Correctly build endiandetect.exe
windows: Avoid warning about constant expression
windows: Workaround for missing strdup in WDK