core: Provide functions for different byte orders

Rationale: see #1586.

Yes, of course we could. I was happy that I found that `__builtin_bswapN()` works for all platforms (well, for all but MSP with N=16), because the generated code for the fallback solution is extremely ugly. What do the warning messages read? If it works, then I would rather use a pragma to silence the warnings.