Zero closed ThreadCondition handles

The ThreadCondition constructor checks for failed calls to CreateMutex
and CreateSemaphore, but if they are detected it closes the handles
without zeroing them. This change zeroes them to avoid unpredictable
behavior from use-after-close.

The change also checks for nullptr before closing them in the destructor
in order to keep handle verifiers happy.

BUG=615306

Review-Url: https://codereview.chromium.org/2043553003
Cr-Commit-Position: refs/heads/master@{#398314}
1 file changed