Resampled Importance Sampling