Merge recent updates to htslib.org into ewels fork

I'll see if I can resolve the merge conflicts with what I did so that my PR can be easily merged. The longer it goes without this merge the harder it'll get.