Haplotype and population structure inference using neural networks in whole-genome sequencing data