Mining giants Rio Tinto and Alcoa have agreed to scrap plans for a new mine in Western Australia to allow the land to be incorporated into a national park.