Failure of carbon nanotube/polymer composites and the effect of nanotube waviness