unsqfs: Minor simplification in read_inode()

Introduced bool "has_fragment" and reformatted the expressions that
compute fragment bytes and number of blocks for the fragment and
no-fragment cases.
unsqfs: Cleaned up hash table code

Put hash calculation into a function (compiler can inline it).
Use shorter local variable names.
Renamed struct fields.
Some minor stylistic changes.
unsqfs: Put pointers rather than offsets into metadata hash table

This is a preparation for on-demand loading of metadata blocks.
unsqfs: Put uncompressed block size into metadata hash table

This is a preparation for on-demand loading of metadata blocks.
unsqfs: Clarified usage of fields of struct inode

Some fields were renamed, others were commented.
unsqfs: Perform all metadata access via accessor functions

This is in preparation for decompressing on demand.
unsqfs: Clean up hash table code

Introduced a constant for table size.
Fixed memory leak: the linked list elements used for occupied table
entries were not freed.
unsqfs: Allocate decompressed metadata per block

Previously, a single memory area was allocated for all metadata.
Allocating it per block is more efficient if we don't end up
decompressing all of it (a future improvement).
The problem though is that inode data can cross block boundaries, so
care must be taken to memcpy from two separate blocks then; this is
done in the read_metadata() function.
unsqfs: Pass metadata_table to lookup_entry()

All the callers have a pointer to a metadata_table anyway.
In the future, struct metadata_table will contain more than just the
hash table and the new fields will be needed to load blocks on demand.

Also gave lookup_entry() file scope (static).
unsqfs: Reorder functions

The new order is more future proof.
No implementations were changed, they were only reordered.
unsqfs: Load metadata on demand

Load and decompress metadata blocks only when we want to access them,
instead of decompressing them all in advance. This avoids unnecessary
I/O on squashfs images that contain a lot of files.
unsqfs: Inlined read_super()

It wasn't really doing enough to make a separate function worthwhile.

Also issue a specific error message for a version mismatch.
unsqfs: Moved the code that deals with fragments

Fragments are used for file contents, so the fragment code belongs in
that section of the source.
unsqfs: Avoid use of macros for fragment size computations

The macros were complicating instead of simplifying things.
unsqfs: Load fragment table on demand

Once a fragment is needed, it still loads the entire fragment table;
this should be limited to just the needed blocks in the future.
Start using static_assert when available
unsqfs: Load fragment table blocks on demand

Info about 512 fragments fits in each fragment table block, so most OPK
files will have only one fragment table block. However, on-demand
loading was not more complex than loading all blocks at once and it is
more consistent with how the inode and directory tables are handled.
unsqfs: Allocate exact fit for last fragment table block

We know exactly how many bytes are in the last fragment table block,
so allocate that number instead of the maximum block size.