Fix memory leak in hooks_cleanup()
Fix memory leak in timer_cleanup()
Store timer_info structs themselves instead of pointers

This reduces the number of memory allocations and improves spacial locality.