Merge version number bump from master branch
Ensure usage tests have a terminal on stdin

Subcommands (starting with samtools stats) given no arguments choose
whether to filter stdin or to display their usage depending on
isatty(STDIN_FILENO).  When testing that usage messages are produced,
ensure commands get a terminal on stdin; otherwise skip the tests
if a terminal cannot be arranged.  Fixes #300.
Recanonicalise regression.sh whitespace -- USE -b/-w TO DIFF/BLAME

This file had mostly 8-space tabs, which previously went unnoticed.
See notes in fcb8af08a6fd3bfcf195407c4ba5bae528ee326d.
Set output file threading only if there is an output file

In particular, there is no output file with -c.  Fixes #302.
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]