A New Zealand mountain has been legally recognised as a person as part of an agreement between the government and Maori tribes.