Genome-wide patterns of homozygosity provide clues about the population history and adaptation of goats