* Remove entirely the hook priority numbers and use before/after dependencies
* Split the WpEvent code out of WpEventDispatcher
* Add methods on WpEvent to interface with it from the WpEventDispatcher.
As a bonus, we can now also implement tooling to inspect which hooks would
in theory run for an event and write tests around that
* Removed some internal debugging facilities and log calls, will redo it later.
* Using spa_list now for the list of hooks, to reduce the number of allocations
happening in the "hook collection" algorithm
* Switched some internal data to use g_new0 instead of g_slice_new0
* Added g_free to free WpEvent structures... surprisingly, we were leaking them
before
It is better to have type-specific event names to minimize the amount
of constraint string matches we do on hooks, as most hooks (if not all)
are interested on specific types of objects only.
Similarly, use a different object manager for each object type to
minimize the performance impact of iterations and lookups, as all
such actions are interested in only 1 object type every time.
Port all existing hooks to the new event names and the get-object-manager API.
This avoids having to determine the subject type prior to pushing
an event from lua code and makes the call more convenient
Also add a debug statement to trace calls to push_event
This can be used anywhere else in the codebase to push a "rescan-session"
event, making sure that there is only one such event pushed on the stack,
no matter how many times this is called.