fix(forEach): refined treatment of objects with numeric length property

fixes #1840
to iterate the object like an array, it must verify one of these rules:
- it comes from jquery so it must have at least a context property
- every other property is a number between 0 and the value of
length property