Single-pass stratified importance resampling