vcf: Support for IDX BCF tag
vcf: Output . for missing INFO, FMT and samples
vcf.c: Fixed a renaming artifact, bcf_clear1 should be bcf_clear
vcf: qual now set to missing on bcf_clear; Avoid warnings about type-punned pointers
Cope with empty containers internal to a CRAM stream.
Technically empty containers shouldn't exist as the specification
states they must contain at least one block. However this is a useful
precursor to the EOF block checking.
Added implementation of cram_external_encode(). It's not yet used
except in experimental versions, but opens up the route to storing
more CORE data in external blocks to make partial decoding simpler (eg
CRAM->FASTA).
Bug fix to the zlib strategy tuning in multi-threaded mode. It could
(legitimately) drive the number of trials negative, but this meant it
never left the trial phase and consequentially encoding speed more or
less halved the instant we asked for more than one encoding thread.
Added refs_t->last_id (note distinct from ->last) for use when reading
from MD5 server. This reduces excessive reloading of the file in
certain cases.

Ideally the reference code should be completely rewritten to use a LRU
cache of reference sequence blocks, seamlessly integrating fasta,
local md5 and remote md5 streams through the same API. That can wait
for another release though.
Add mfsteal to mFILE, and use it in cram_populate_ref.

mfsteal returns the data stored in an mFILE.  The mFILE itself is
closed after the data has been detached.  This can be used to replace an
unnecessary allocation and copy if the entire contents of the mFILE are
wanted.

Update cram_populate_ref to use mfsteal.  This halves the memory it uses
when trying to load via REF_PATH.

(Code change by Rob Davies.)
Added missing return code checks.  Fixed 'x' mode of mfreopen.

Added missing checks for system call return codes.  Mainly malloc/realloc
but also i/o calls in mfflush.

Removed pointless check to see if the underlying file is seekable in
mfreopen when 'x' is present in the mode string.  The whole point of 'x'
was to turn off a seek in mfflush, so it doesn't matter if the file is
seekable or not.

(Code change added to io_lib by Rob Davies.)
Added some EOF block creation and checking.

It's not complete yet as nothing in the above directory (htslib
proper) checks this yet.
Bug fix to cram_next_slice().  The new while loop checking for
non-empty blocks caused a crash when multi-threading.
Bug fix to EOF block writing when in multi-threaded mode (not yet
supported in htslib's cram interface). It was writing the EOF block
before flushing any pending threads.
Output VCFv4.2 header
Merge branch 'develop' into bcftools+calling
Updated test
vcf: Make sure fileformat is added only once
Added a check to EOF in Cram in hts_close(). Note that this isn't the
same place that BAM checks as it does it in hts_open(), however the
benefit of doing on close is that this check can work when inputting
from a pipe.
Merge branch 'develop' of https://github.com/samtools/htslib into develop
Updated the Cram EOF block detection to avoid falsely considering the
lack of an EOF block as an error when doing a sub-range query.

Also simplified the API, removing the cram_has_eof_block() function in
favour of using a tri-state cram_eof() return code.