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.
Merge pull request #1000 from daveab/feature/divide_by_zero_investigation

Feature/divide by zero investigation