it: filled dnet_iterator_set_state stub

Also simplified code an removed unused variables.
it: moved dnet_iterator_list_next_id_nolock

Also added failsafe assert.