Bug fix to khash-ification of sam_hdr_add_lines
A bit of a hack to set the header and references up properly for
cram. This is a hack right now as it requires accessing internals of
the fp, but it should be fixed in future by properly supporting
methods to manipulate these fields for all data types rather than just
cram (eg see scram.c in io_lib).
Added some synthetic SAM test data and a test perl script to trial
conversion between SAM, BAM and CRAM. A work in progress.