kalman and smc: prediction residuals are now computed before resampling or update