Further work on bam merge to fix header produced

Add code to append SQ tags to header
Fix asprintf format specifiers
Fix bugs picked up by unit testing.
Make trans_tbl_t a named struct and move aside variable names the same as it.
More work on merging @RG and @PG tags into header.
Unit tests for merge
add skeleton code for PP processing
NULLify some freed pointers.
Add tracing statement
Unit test trans_tbl_init add test 5 for PG tags
Fix memory leaks and finalise @PG PP handling
Test @PG merging and PP handling
Integrate new header merging code into bam_sort main function
Clean up old dead code
Fix case where PG or RG tag is present on read but not in header.
Fix translation of tid == -1 aka unmapped.
Sort out extra \n in header text.
Add test bams
Fix spaces to tabs
Eliminate compiler warnings in a cross-platform safe way.
Tweak comments a bit.
Add unit test for bam_translate (WIP)
Fix edge case
Add unit test for tid translation
Add additional unit tests for bam_translate for PG and RG tags.
Adjust how merge handles duplicated PG and RG tags.

Initial work for merging identical RG instead of always creating new
entries.