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.