Bgzf: added output_string function
Sam: constructors for cigar_op

as cigar_op is a private type, we need constructors to build them from
BAM, which has a different encoding of CIGAR operations than SAM (so
the parser does not help here)

Also private row polymorphic types have switched from open to closed,
to allow exhaustivity checks outside of the Sam module.
Sam: refactored cigar operations
bgzf: fixed and clarified the behaviour of some output functions
bam_alt: first implementation of a writer + small test