Remove usages of threads in DummyThreadGroup

The patch removes creation of threads in the DummyThreadGroup class
during tests, returning a fake thread object instead. It removes some
race condition triggering tracebacks during tests.

Closes-Bug: #1330292
Change-Id: I3214816a4173670d22385dbe67cc016d74c2ce18
Merge "Remove usages of threads in DummyThreadGroup"