WIP: Big endian support

Fix issue #888.
Important: builds on top #5490. Only commits starting from **'build: Endian compatibility'** belong to this pull, the rest should be reviewed there.

This has been structured so that each compatibility change is one commit that touches only one file. After the initial build change, they are independent.

Most extensive changes are in **'src/serialize.h: base serialization level endianness neutrality'**. I had to replace READDATA and WRITEDATA with functions that take sized integer types to make use of the proper `endian.h` functions. I'm confident that the end result is the same, although this may require more tests.

I've tested this on mipsbe32. 

- Testnet syncs correctly
- Node can successfully function on P2P mainnet
- Checked that data directory can be copied between endians with no adverse results (only peers.dat required special attention here)

Known issues:

- DNS seeding always comes with 0 results