fix(forEach): should handle JQLite and jQuery objects like arrays
fixes #1840
should handle JQLite, jQuery, NamedNodeMap
and StaticNodeList (IE) objects like arrays
other objects with a length property should be handled normally

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