Add forEach method to objects for element iteration

Signed-off-by: Daniel Francis <francis@sugarlabs.org>