TrigDecisionTool: Fix thread-safety problem.
CacheGlobalMemory::getChainGroups() is not thread-safe, since it returns a pointer to a map object which is supposed to be protected by a lock inside CacheGlobalMemory.
However, this is used only by ChainGroupFunctions::getChainGroup. Fix by removing getChainGroups() and moving the getChainGroup() logic inside CacheGlobalMemory where we can properly take the mutex.
See ATR-26495. Backported from master.