Fixes to pileup code

Fixes issues relating to multiple reference contigs. Additionally, increases test coverage for reference position code, and RDD code.