fix(angular.forEach): correctly iterate over objects with length prop

Should handle JQLite and jQuery objects like arrays but not other objects
with length property.

Closes #1840

Signed-off-by: Gonzalo Ruiz de Villa <gonzaloruizdevilla@gmail.com>