Revert "wip: Implemented finer grained plugin hooks"

Until plugins have been rewritten, this change is in the hooks branch

This reverts commit e12cde57574394171d817366ec44a1e8ea94eec9.
Fixed new plugin hooks
Revert "Revert "wip: Implemented finer grained plugin hooks""

This reverts commit b436f2e03548eeccd330b2c3c63a99ee87e4b908.
Merge branch 'hooks' into plugins
Revert "Revert "wip: Implemented finer grained plugin hooks""

This reverts commit 0230d1f06a8c2d65ac23e903eaefe8bddc674701.
Merge branch 'plugins' into without_threads