Create header of common test functions

Create a header to be included in tests for common functions.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add split command to samtools

The split command takes BAMs which consist of multiple readgroups
and separates them out into separate files, one for each readgroup.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's count_rg

Add unit test to test count_rg function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Polish bam_split

Unit test expand_format_string
Change from output_prefix to output format string
Make usage write to stdout when not an error.
Make stdout usage appear if no arguments given.
Make unaccounted reads an option and whine if found and not specified.
Filter alternate @RG lines from the files they’re not in.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's filter_header_rg

Add unit test to test filter_header_rg function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Restructure testing structure to dedupe

Move certain functions from test.h into a test.c file to reduce code
duplication.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's parse_args

Add unit test to test parse_args function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>