Fix race condition in Logger.ErrorHandlerTest

When crashing the error logger handler, the handler's watcher could log
its message before Logger was flushed, causing the watcher's log
message to appear in the first, rather than second, capture_log.
Merge pull request #2713 from fishcakez/logger_eh_racecon

Fix race condition in Logger.ErrorHandlerTest