[9.16] Create a second pruning task for rbtdb with unlimited quantum
Previously the rbtdb->task has quantum of 1 because it was originally used just for freeing rbtdb. When tree pruning started sending the events to the task, it could become overwhelmed because it would just prune a single node at the time.
Create a second task with virtually unlimited quantum (UINT_MAX) and move the pruning to this unlimited task to ensure that all nodes sent to the pruning tree will be pruned before more nodes for pruning are queued.
Backport of !8823 (merged)
Edited by Ondřej Surý