Add hclose_abruptly() for stack unwinding after errors

This variant of hclose() is for use when an (e.g. I/O) error has already
occurred and you just need to close and deallocate the stream without
caring about any further errors.
Change hts_close() to return int (error indication)

Also add documentation to hts_close() and reformat hts_open() docs and
note format autodetection when reading.

Fixes #29.  Further changes are likely in the places where hts_close()
is called, to report errors.
Fix bgzf_write() for large (> 2GB) blocks

bgzf_write() takes a size_t length, so its internal counters need to be
size_ts or ssize_ts rather than ints if it is to operate on lengths up to
max(ssize_t) as advertised rather than just up to INT_MAX.  Also inline
the salient parts of mt_write() rather than duplicating the loop code.

Fixes samtools/samtools#67 (more than 2GB of headers fails), but note
that the BAM l_text field is a *signed* int32_t, so in fact BAM files
with such large headers are outwith the spec and likely not portable
to other BAM implementations, notably Picard.