Fix flaky test_barrier_timeout* tests for test_distributed. (#36963)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36963
A couple of reasons why these tests were flaky:
1) Sometimes the error message for timeout would include lowercase 'timeout'
which was not included in the regex.
2) The timeout was 0.2 seconds, which was probably too small for ASAN/TSAN.
ghstack-source-id: 102541231
Test Plan: waitforbuildbot
Differential Revision: D21144954
fbshipit-source-id: 57945f53e1627028835cbfd2adb72f21d87f593f