[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
well then lucene wouldn't work anymore since it's moveing it's commit to this too. I think ES can't be supported if your FS doesn't support this. I think we can test this to be honest but I guess it should be in the LocalGW code. I will try an take a look