Rachin Ravindra steered New Zealand into the Champions Trophy semi-finals after hitting his fourth ODI century in a five-wicket victory over Bangladesh.