Unify byteswapping functions, and avoid nonportable versions.
Merge pull request #1 from bentley/bswap

Unify byteswapping functions, and avoid nonportable versions.