Enhance gen_ets_ns behaviour to support batch iteration