Resolving Complex Microbial Populations and Transmission Networks Through Haplotype Reconstruction