thread state coordinator: added test for notify after two pending thread stops.

Glad I did - caught a bug where the auto variable was not a reference
to a set and instead was a copy.  I need to review rules on that!