Avoid using htsFile is_foo bits directly

Use the new public hts_get_format() facilities.  Requires htslib
commit 529ca88071e775a488e4108945d5bd863a4190f0 / version 1.2 or later.
Fix typo in 'samtools flagstats' output

supplimentary --> supplementary

Reported by Daofeng Li on the samtools-help mailing list:
http://sourceforge.net/p/samtools/mailman/message/32983845/
Added a test for specifying the reference via samtools -T.  This
appeared to work in our previous tests, but did not due to the code
sneakily reverting to the @SQ UR: field instead.
Merge origin/develop, prefering avoiding using htsFile internals
stats: Calculate mismatches per cycle for unclipped length
Merge branch 'develop' of github.com:samtools/samtools into develop
Avoid "my" variable redeclaration [minor]
Prevent warnings when compiling on a 32-bit host [minor]

Avoid "%zu" as this C99 library functionality is not supported by MSVC.
Merge origin/develop into develop
Convert bam2bcf_indel.c to use the htslib API directly
Update comment documentation for bam_mate

Clarify how we now handle supplementary reads and note limitation.
Remove unused kaln.c, kaln.h global aligner

The kaln global alignment functions have been unused in
bam_md.c since 51f014165fb63b2b9b86db80ea4681f9351453a1 and
bam2bcf_indel.c since bf8b35cc189c6c846f01752f9e9500a3c08cd9b1.