The United States will stage the men's Rugby World Cup in 2031, with the women's competition coming two years later.