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.
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.
Merge branch 'develop' of https://github.com/samtools/htslib into develop
Fixed initialisation of CRAM indexing when the CRAM file contains
refids that aren't sequential.
Initialise beg and end values in the hts iterator. Without these
mpileup simply bails out after fetching the first column as end is 0.
Fixed the iterator to be 1-based inclusive coordinates for CRAM.
Also initialise tid in case user code looks at it

Futher to the initialisations in c68d523699913eacd062bbc19f07796964401d30.
Probably user code shouldn't be looking at these fields, but at present
mpileup does and perhaps other code as well.
Merge pull request #46, CRAM EOF blocks