build: Endian compatibility
- Detect endian instead of stopping configure on big-endian
- Add byteswap.h and endian.h header for compatibility with Windows and other operating systems that don't come with them
- Update crypto/common.h functions to use compat endian header