Remove unused function
Make WaitingList::cleanupList static
Remove unused function
Fix critical bug

The dispatcher would keep adding the same task to its queue, which
means that the connection would never be closed on our end (potential
memory leak) and the dispatcher would always be busy dispatching this
same task (100% CPU usage).
Remove unused function
Set parent to nullptr in Item copy constructor
Code cleanup & performance improvements
Optimize stackpos lookup code