For #27418 - Hook loading is now thread-safe
- Previously, loading hooks in separate threads at the same time could cause issues as the loading mechanism was not thread-safe.  This has been fixed.
- This change also includes improvements to the fix for hook sub-classing for #27328
- Closes #117