Fix Log Dialog sometimes blocks on closing, TortoiseGitProc.exe not exiting

Call PeekMessage() to check the message loop before calling AfxGetThread()->PumpMessage()

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>