[CORE] Add cluster and index state checksums

This commit adds checksumming for cluster and index states. It moves
from a plain XContent based on-disk format to a more structured binary
format including a header and footer as well as a CRC32 checksum for
each of these files. Since previous versions didn't write any format
identifier etc. this commit adds a file extension `.st` for states
that have header/footer and checksum.
This commit also moves over to write temporary files and moves them into
place with an atomic move operation. This commit also serializes and
deserializes the states without materilazing them into opaque memory.

Closes #7586
What should we do if `Files.move(...)` throws the `AtomicMoveNotSupportedException`? We should probably handle this case. Should we test this on ES startup and fail to start if it is not supported since we can't write state without it?