Fix getline memory leak in test_filter_header_rg
Fix getline missing fcloses in test_parse_args
Add missing frees to test_parse_args
Free char* in parsed_opts in test_parse_args
Revert "Add missing fclose of orig_stderr to test_bam_translate"

This reverts commit 6cc9736f8d68775440f817edecf6c412ef599fa9.
Don't fclose orig_stderr, its still needed
No need to set len=0 before getline
Free all allocated names from count_RG
Merge branch 'merge-test-mem' of https://github.com/samstudio8/samtools into merge-test-mem