Error checking around cram_open.
Added prototype for bam_construct_seq().
Merged with upstream io_lib changes to cram I/O; mainly robustness
checks and support for shared references (needed by cram merge).