feat(*) add support for exit_worker_by_lua
Summary
Adds support for an OpenResty phase exit_worker in Kong core, and enables that phase for plugins too.
Shall we modify pdk.private.phases.lua, add a new constant exit_worker?
@bungle can you rebase this over master please?
Guess we should also support it for plugin servers?
For the benefit of everybody outside of the Kong core team, here's a bit of explanation: The exit_worker phase of nginx happens when it has already closed all connections, stopped processing timers and handling its internal event loop. This means that then environment in which exit_worker callbacks would execute would be very limited and much different from the normal execution environment provided to plugins. As we are working on changes to plugins to provide a more useful way to hook into the orderly shutdown process and we also have no clear usecase for exit_worker, we have decided not to pursue this PR further.