fix(middleware): change to use vanilla for loop
fix(middleware): change to use vanilla for loop

- Change use of for..in to plain for loop due to issues where array prototype is modified

Fixes #2671

david-garcia-nete/karma,johnjbarton/karma,karma-runner/karma,david-garcia-nete/karma,karma-runner/karma,maksimr/karma,david-garcia-nete/karma,karma-runner/karma,johnjbarton/karma,maksimr/karma,johnjbarton/karma,johnjbarton/karma,karma-runner/karma,maksimr/karma