fix XET-681
XET protocol specification initial draft
- documentation of core procedures required for file uploads and
downloads
- format specifications for shards and xorbs
This PR switches the order of the sections in the shard format so all the lookup tables are at the end. This allows us to only read the first part of the shard server-side to get all the information needed, without needing the footer to know where the sections are.
To make this more robust, I also introduced explicit functions to call to get the byte offset ranges of each of the sections instead of having numerous places that depend on the end of a section being the start of the next. This makes the code more readable and robust.
Because this is a big change, it also updates the magic tag for the format to be b'HFMetadataBeta' plus some magic numbers. This will cause failures to happen earlier rather than later.