[HooksManager] Add plugin whitelisting

Mostly @segiddins's work, supersedes and closes #2830