Rename write_header_to_legend_file to create_legend_writer
Rename extract_id_and_lib_values to extract_id_and_lb_values
Pull extract_id_and_lb_values into the main _detect_variants so that it's only executed once for each bam