unsqfs: Don't exit on error in opk_sqfs_open()

When unsqfs was a proof of concept command line program, exit on error
was fine, but it is now part of a library.

The only caller, opk_open(), was already prepared for opk_sqfs_open()
to return NULL on error, even though the old code never did that.
unsqfs: Don't exit on error in opk_sqfs_extract_file()

When unsqfs was a proof of concept command line program, exit on error
was fine, but it is now part of a library.
unsqfs: Removed EXIT_UNSQUASH macro

It is not used anymore and it should never be used again.
unsqfs: Fixed indentation
Enabled more compiler warnings

Also fixed the warnings that were produced after adding the new flags.
Switched to C99 and use new-style Booleans
unsqfs: Propagate errors from reader() and deflator()
unsqfs: Reduce the number of system header extensions activated

Instead of defining _GNU_SOURCE, define _XOPEN_SOURCE to 600: this
provides the S_IF* constants we need without pulling in a lot more
extensions that could hurt portability.
Added Make target "analyze" to run Clang's static analyzer
unsqfs: Fixed use-after-free

The writer() function frees the "block" argument, so accessing
"block->size" afterwards was invalid.
unsqfs: Added support for LREG inodes

These are used for really large files and for sparse files.
We don't really need support for those currently, but the amount of
extra code needed is pretty limited.
unsqfs: Rewrote sparse file unpacking

The previous code was overly complex, probably because it originated
from a tool that supported multithreaded decompression and output to
sparse files.

It also contained bugs, such as block->buffer->data being freed in a
situation where block->buffer is NULL. Also the delayed writing of
zero-bytes was done while the buffer pointer was already pointing to
the first block after the gap.
unsqfs: Removed unused member "file" from "struct PkgData"
unsqfs: Simplified write_buf()

Inlined writer() function, replaced dynamically allocated "struct
file_entry" by local variables.
unsqfs: Inlined reader() and deflator() functions

There are no immediate benefits from this, but having the code in one
place does make it easier to spot possible future simplifications or
optimizations.
unsqfs: Avoid copying block list

Also gave pointers to the block list more sensible types.
unsqfs: Inlined read_fragment()
unsqfs: Don't store buffer size in the cache struct

The value is always equal to the block size, so there is no point in
storing a size per cache.

Also omit pointer to the cache from cache entry struct, since it was
never used.
unsqfs: Make cache_get() return data directly

Before, it was wrapped in a cache_entry struct, but all info in that
struct came from the cache_get() parameters, so the caller already had
that info. And the entry object was destroyed soon after.
unsqfs: Renamed cache_get() to read_data_block() and don't allocate inside

This function doesn't actually get anything from the cache.

Allocating the buffer at the same level where it is freed yield more
readable code. Also, it allows the buffer to be allocated once per
unpack operation, instead of once per block, which is more efficient
when files span multiple blocks or use fragments.