Refactor PG BAM header record adding

Refactor code for adding BAM header PG records (and only add a single record for spatial filter)