Estimation and inference of threshold regression models with measurement errors