Prepare the Qt painter for wxDC

Note that the function QtPreparePainter was already there but unused.
Added some __WXQT__ guards in grid

The size of the cell should not substract the grid line to be drawn correctly.
Also, the highlight rect should not be reduced to cover all the cell like in wxGTK (if not, it left white pixel line surrounding it).
The other guards (set background and layout direction) are for consistency with wxGTK.

There are still some painting issues related to the clipping regions and cell editor positioning.