Sync threadgroup module from the oslo stable branch

This is to allow change Idf5b7c1100fc85743ac6dc5831731f7ecc96bfd6 to be
applied to the stable branch.

Change-Id: I839129874de6697594fbe5f3bfb937180041bdbc
Stop periodic watcher tasks before deleting stack

In the case where a stack that has a watch task associated with it is
being deleted and the engine successfully acquires a lock, no attempt to
stop the stack will be made since it has no action in-progress.  This
will result in orphaned watcher tasks being left behind, since the
watcher tasks are normally stopped as part of the call to
ThreadGroup.stop().

To fix this, explicitly stop the periodic watcher tasks before calling
stack.delete().

Conflicts:
	heat/engine/service.py

Change-Id: Idf5b7c1100fc85743ac6dc5831731f7ecc96bfd6
Closes-Bug: #1315044
(cherry picked from commit 33ea3573422ac32f4bd1788603fef64bea7e85bd)
Merge "Sync threadgroup module from the oslo stable branch" into stable/icehouse
Merge "Stop periodic watcher tasks before deleting stack" into stable/icehouse