New solitary wave and periodic wave solutions to the (2+1)-dimensional Nizhnik-Novikov-Veselov system