Improve handling of BAM index files, avoiding regeneration where possible and doing index work in more parallel tasks