Added CRAM support, copied from staden io_lib.
This is monumentally hacky, but it's a proof of principle. There is a
lot of code duplication as io_lib has its own hash tables, dynamic
strings, etc. The only additional code in io_lib that is not in the
Staden Package io_lib is io_lib/cram_samtools.[ch]. This has some
hacks to make io_lib's bam_seq struct look like a bam1_t and to
replace the missing functions from io_lib's bam.c (mainly
bam_construct).

The non io_lib directory changes revolve around the generic samopen()
function which now handles modes "rc" and "wc" too, the -C and -D
arguments in sam_view.c.

Also updated samtools flagstat to support -S, -b and -D arguments and
to use the samopen() API instead of bam_open() API. This means it can
generate stats from all file types instead of only BAM.