Add a way for plugins to hook into the global event filter.

This will allow us to move some of the non-generic bits from the probe to
the plugins, without duplicating all the filtering logic there again.
Move the dialog de-modalization to the widget plugin.

This removes the dependency on QDialog from the core probe.
Add lots of missing license headers.