Captain Brendon McCullum became the first New Zealand batsman to score a triple century in Test cricket.