Use hash table to merge reference sequence headers

Merge in each new collection of @SQ headers via a hash table rather than
using an O(n^2) approach.  Fixes #260.
Release 1.1: bug fixes
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.