Don't dispatch pending events from selective YieldFor().

Pending events list can contain events from all kinds and dispatching them
from YieldFor() called to dispatch the events of some particular kind only
(e.g. to redraw the window) is unexpected and wrong, e.g. it breaks some uses
of wxProgressDialog, see #15799.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775