Acl hooks

Allow plugins to extend acls, and to override edit and read based on context.

Also extends triggerEvent to allow setting of a default return value.