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.