France has welcomed the result of New Caledonia's referendum to reject independence and remain a French territory.