Parental investment predicts genetic diversity in animal species