Inferring genome-wide variation in mutation and selection from polymorphism and divergence data