A cooperative effort to save a ground-dwelling bird has diverted it from possible extinction, federal officials declared Tuesday, as they sought to safeguard the habitat of a declining species while maintaining key pieces of the American West’s economy — oil and gas drilling and ranching.