WL#9342: Logging services: log filter (filtering engine)

Affects: Server-8.0   —   Status: Complete

LOG FILTER/S

The umbrella WL#9323 defines "logging TNG", which has as one of its main goals 
"structured logging" (i.e. logging entries that have data beyond a single 
plaintext log message, such as a separate error number, etc.).

It stands to reason that if we have these rich data, it becomes easy and 
desirable to filter them.

This implies the following points of order:

- implement a new filtering engine that can handle the structured log events 
defined in WL#9323. The first implementation aims to maintain 
compatibility with the features it replaces; its primary goal is to change the 
code over to the new model.

- that filtering engine will the built-in default. the user can not accidentally 
misconfigure their system to have no filters at all.

- by default, the engine tries to emulate 5.7 behavior (heeding current 
configuration variable --log-error-verbosity and setting up the same rate-
limiting for selected "spammy" messages, and so on)
  - throttles for binlog.cc, connection_handler_per_thread.cc log_event.cc

- the logging framework shall expose the necessary calls for plug-in services to 
implement a filter. It should be possible to run such a filter instead of the 
built-in default. This will allow users to offer alternative, more powerful 
filtering, allow power-users to create custom filter plug-in services, and so on.