Add code to investigate data race

Provides control of race windows and logging for some of the interesting transitions.
Enlarge the race window for some test cases

These changes cause an assertion in lb_sendpipe() when executing the test_security_plain testcase.