Fix CGUIWindowManager::DispatchThreadMessages() to process messages in order.
it's similar fix with https://github.com/xbmc/xbmc/pull/2167