Convert rmdup to htslib

Convert rmdup code to use htslib calls and constructs.