Switch to custom byte swapping function.

GCC builtins like __bswap_32 are not portable between versions.
Compilers are obliged to accept a member of the union as input to a function taking a union.
If we ever have problems with that, we can always change to
```
static inline uint32_t ByteSwap32(uint32_t in)
{
    bsint32 src = { .word = in };
```
which would even let us move the typedef inside the function or, indeed, get rid of the typedef and just use the raw union in the declaration, without naming it:
`union { ... } dst, src = { .word = in };`