Revert "Readded hook_ctools_plugin_directory"

This reverts commit ac3665b3d81f4ec878c894ee056e9f74eb481695.
Revert "Performance improvements: avoid slow queries"

This reverts commit b1a89734156ff8a1ab4a1550139bd7d805115acd.