These are all the architecture macros I could find with known endianness. Use those as a fallback when BYTE_ORDER isn't available. See #787 (comment) It also adds a SHA256 selftest, so that improperly overriding the endianness detection will be detected at runtime.
Backport of secp256k1 PR799.