Added tests/test_view
(io_lib r3438/7)

Improved error reporting and detection for MD5 sums. We report where
the md5 error comes from (which reference slice). We also have better
detection of slices that overhang the end of the reference.

Finally it no longer crashes sometimes after getting reference errors,
now exiting cleanly with exit code 1.
(io_lib r3439)

Added test case for sequences with alignments beyond references. These
are handled by scramble by adding individual base features for the
base calls that are beyond the reference.
(io_lib r3460)

Fixed curl timeout. We meant CONNECTTIMEOUT instead of TIMEOUT. This
was causing long downloads to be terminated early.
(io_lib r3461 minus arithmetic coder & last_name experimental parts)

Optimised the compression levels so -1, -3, and above are more
distinct and use their own specific zlib parameters.

Minor speed up.
(io_lib r3467)

Bug fix for reference handling when fetching via MD5/http.

Firstly the fd->refs->lock mutex has been moved to just before
cram_populate_ref instead of just after, given that this code is not
thread safe (it potentially uses open_path_url+curl in a manner which
shares the curl handle between threads).

Secondly certain thread orderings could cause the reference count to
hit zero and then try to reaccess it again, which triggered a
bug. ref->length is now reset to zero as well as ->seq=NULL as both
are checked.
Silenced a "pointer targets in initialization differ in signedness" warning.