Fixed a buffer overflow when dealing with cigar strings ending with a
deletion.
Improved fix to mpileup. The previous one just skipped bases where we
have no quality. This still includes them in the pileup, but with 0
qual instead.
Also fix buffer overrun on data where the sequence is "*".
Fixed up test data, now that it correctly outputs "n" instead.
Merge pull request #306 from jkbonfield/mpileup-fix

Mpileup fixes
Man page formatting fixes

Use hyphens to introduce options rather than en dashes
(addresses samtools/www.htslib.org#5 for samtools man page).
Write failure messages to stderr

No difference by default, but enables highlighting the failures or
capturing them by redirecting stderr.
Maintain HEAP_EMPTY invariant when an input is empty

Ensure h->b is NULL when we hit EOF on the first read, just as it is
when we hit EOF later in the file.  Fixes #309 and also prevents a
memory leak for an input file with no records.

Also use bam_init1()/bam_destroy1() instead of creating and destroying
bam1_t structs by hand.
Avoid using htsFile is_foo bits directly

Use the new public hts_get_format() facilities.  Requires htslib
commit 529ca88071e775a488e4108945d5bd863a4190f0 / version 1.2 or later.
Reflect changes in htslib API
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.