RFC: htslib header parser

* Added bam_hdr_rg_entry struct to store metadata on each read group line
* Added bam_hdr_pg_entry struct to store metadata on each program group line
* bam_hdr_t stores pointer to next bam_hdr_[r|p]g_entry as rg, pg
* process_bam_hdr_entries accepts bam_hdr_t* and populates linked list
  structure of bam_hdr_rg_entry and bam_hdr_pg_entry by parsing contents
  of h->text
* bam_hdr_destroy frees rg and pg linked list structures via destroy functions
  bam_hdr_rg_entry_destroy and bam_hdr_pg_entry_destroy
* sam_hdr_read, bam_hdr_read and bam_hdr_dup populates header data via call to
  process_bam_hdr_entries before returning bam_hdr_t*
* Used by sister commit in samtools to drastically improve the
  performance of samtools merge command