CRM-14707 - Cache the existence of hook functions.

When there are a large number of modules enabled and a large number
of api calls are made on a single page, function_exists gets called
a significant number of times so cache the results the first time
CRM_Utils_Hook::runHooks is called.