hook: add a 'hashook' function to test for hook existence
Preparing the data for some hooks can be expensive. Add a function to check if
a hook exists so we can skip useless preparation if no hook is configured.
# name space package to host third party extensionsfrom __future__ import absolute_importimport pkgutil__path__ = pkgutil.extend_path(__path__, __name__)