Refactor into functions (note code duplication between scripts)
Remove duplicate line in XML
Updated with patched samtools bam2fq to give FASTQ

See https://github.com/samtools/samtools/issues/313 - remains
to be seen if and how the command line API will change, and
what default value will be adopted for missing qualities
(here I am using PHRED 1) or if such reads will just get
dropped instead.
This new tool will need a tool_dependencies.xml
Will be using samtools view to parse BAM files.

Currently No reason to request samtools v1.1 (current latest),
so initially target the tried-and-tested samtools v0.1.19
released prior to the htlib backend change.
Handle BAM files via samtools view
Oops - want  mapped reads (not unmapped reads, FLAG 0x4)
Implement lax and strict pairwise mapping criteria
Comment out debugging print
Document default for pair mode option