Plugins should be able to register hooks to a "cleanup" event that fires at the end of the contexts lifecycle.