Resolve a set of semver constraints with the fewest versions possible.