Combinatorial analysis and algorithms for quasispecies reconstruction using next-generation sequencing