Add iterator creation function as a type callback

Add object_iterator_new function
Add foreach and foreachk macros