Replace netmgr quantum with loop-preventing barrier
Instead of using fixed quantum, this commit adds atomic counter for number of items on each queue and uses the number of netievents scheduled to run as "quantum" for a single process_queue() run.
This prevents the endless loops when the netievent would schedule more netievents onto the same loop, but we don't have to pick "magic" number for the quantum.
Edited by Ondřej Surý