Reinstate distinct bgzf_check_EOF() status for seek failure

In bam_hdr_read(), report errors from bgzf_check_EOF() regardless of
hts_verbose, especially because after seeking the stream is likely in
an invalid state for reading the header.

Fixes samtools/samtools#18.
Compile cleanly without warnings with gcc 4.6.3
Fixed return status checks of fread calls
bcf_gt_type can now, optionally, give the index of the 2nd alt allele for GT_HET_AA genotypes
Merge pull request #33 from sm15/develop

bcf_gt_type can now, optionally, give the index of the 2nd alt allele
Merge branch 'develop' into bcftools+calling
vcf: Support for regions in the form chr|chr:pos|chr:from-to|chr:from-
tbx: Sanity check if the file type meets the expectation, detect non-numeric fields
hts_idx: check return status of bgzf_read
bcf reader: Fix in chr:pos type of regions
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.
synced reader: Support for BED regions/target files
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.
synced reader: regions and targets now support VCF; Fix for match_alleles by reverting 0-terminating chr modification
synced reader: Give a hint when tabix was used with wrong column indexes for regions/targets
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.
pileup: Detect non-recoverable errors and exit with proper status
vcf: new APIs bcf_alleles2gt and bcf_gt2alleles; bcf_synced_reader: recognise compressed BED files
Resolved merge conflicts
Merge branch 'bcftools+calling' into develop