Introduce a ThreadGroupManager class to manage active ThreadGroups for
engine services and move the thread-related EngineService methods to
ThreadGroupManager. This will make it easier for multiple engine
services to manage thread groups.
Partial-Bug: #1262012
Change-Id: I1ce7785021726c274a294ef402b036540d395a29