Scattering of linear and nonlinear waves in a waveguide array with a PT-symmetric defect