[Git][wine/wine][master] server: Cleanup all the global hooks owned by terminating thread.