Fix a nasty bug when double-clicking common dialogs

Can't believe I forgot about this until now.  It's well-documented that
double-clicking files in a raised common dialog will forward the second
click through to the owner window (at least in VB; not sure if other
languages suffer the same problem).  This can cause all sorts of
unexpected behavior on the main window if not handled properly.

You'd think it would be easy to catch this behavior, but because the
click is artificially delayed on its way to the owner window, you can't
reliably catch it with a simple If/Then catch and a global tracking
variable.  Instead, you have to do something messy like flush the input
cache.

I've opted for a simpler solution, which is to simply enforce a slight
delay when returning control to the main window after a common dialog
has been raised.  This reliably fixes the issue on my test PCs.