fix(ngSwitch): ensure correct iterator is passed to async function

Closes #8833
refact(ngSwitch): don't create extra function in for loop

Closes #8927