WL#9387: InnoDB: Group purging of rows by table ID

Affects: Server-8.0   —   Status: Complete

Since the introduction of multi-threaded purge the purge threads work on random
undo log records. If different purge threads all purge from the same table this
leads to higher contention on the dict_index_t::lock (RW-LOCK).

To reduce dict_index_t::lock contention, we should group the undo rows by table
ID and then parcel the work to the purge threads based on the table id.

This is a feature request from Facebook Inc.