core: add_function_hook()
Up to now every check has had a call back for every function. Then they
all call strcmp() to see if it's one of the functions they care about.
The problem is that is slow for large numbers of functions. The new way is
that you'll: add_function_hook("down", &lock_function, NULL);
The lock_function() will look at the arguments and set the state locked.
The last argument is for if you want to pass other data to lock_function().
Signed-off-by: Dan Carpenter <error27@gmail.com>