Add a Thread/lock stress test

Which so far fails all the time.  Not sure whether the test is ok.