merge of Petr's initial htslib completion
lots of changes
many edits including cleaned up interface for pbwtCursor and referencePhase().
referenceImpute() is unfinished/unfunctional as yet.