Add a whitelisting functionality for registrant hooks

Defaults to unused (because most people won't want this, and it's a bit confusing
for developers to have hooks that don't do what they say on the tin unless their
sysadmin remembers to press the right button).

Change-Id: Ia19abd2403f99df186ace4b31fc6bb6eb0757155
Merge "Add a whitelisting functionality for registrant hooks"