Store a bitmap of active hooks on the client side to try to avoid
server calls for hooks that are not set.

diff --git a/server/user.h b/server/user.h
index 36fd880..0f66a4d 100644
--- a/server/user.h
+++ b/server/user.h
@@ -53,6 +53,7 @@
 
 extern void close_global_hooks(void);
 extern void remove_thread_hooks( struct thread *thread );
+extern unsigned int get_active_hooks(void);
 
 /* queue functions */