Semiparametric Conditional Moment Models with Possibly Nonsmooth Residuals and Nonclassical Measurement Errors