bgzf: massive bug correction (also in bam)

Bgzf:
- incorrect write endianness
- check valid argument in bgzf.input_string
- incorrect isize in block
- incorrect update of current position in uncompressed buffer
- output_char was always writing spaces

Bam:
- length of certain NULL terminated sequences
- write of plain SAM header
- added more tests
bam_alt: now propose partial and complete parsing