obj: move cd_obj_iterate_stack to obj-common.c