Ross Taylor scored an unbeaten century as New Zealand made 223-2 on the opening day of the second Test against Sri Lanka in Colombo.