President Emmanuel Macron has reaffirmed France's ownership of New Caledonia on a landmark visit to the South Pacific island.