highgui(win32): improve waitKey() timeout condition
highgui(win32): improve waitKey() timeout condition

- use cv::getTickCount() instead of Win32 GetTickCount()
- process message queue before timeout exit

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv