Move hook calling to its own method
Move hook calling to its own method

Utilizing hook functionality should be done within the manageHooks()
method. If hooks are used in the constructor of an extension, and if
a database connection is involved, the database handle will be NULL,
because setDatabaseHandle() would not have been called yet. By using
manageHooks(), all extensions can safely utilize the database.

ecj2/kaku,ecj2/kaku