Fix erasing background regression in wxQT

Default paint handler has to clear the background is style is Qt::WA_OpaquePaintEvent (needed for wxBG_STYLE_ERASE so wxClientDC works outside the paint event).
The background will remain black (unpainted) or inconsistent if not cleared in this case.
Add a debug message if qt painter is aborted
Don't draw and reset wxClientDC if empty in wxQT

This fixes an issue when wxClientDC is used just for metrics calculations (for example, in wxTreeCtrl::Expand), so there is nothing to draw but if the QPicture is not reset, wxWindow::QtHandlePaintEvent get confused and don't use a wxPaintDC for an event generated by Refresh (thinking wxClientDC is valid and asking a repaint, but it will not replay anything).