Handle parent is None from query_tree_reply in QxcbWindow::frameMargins

None is a valid return value for parent in xcb_query_tree_reply_t.
If that is used as the new parent the next call to
xcb_query_tree_unchecked will fail with a BadWindow error.

Change-Id: Iafe29b223ca65c86ecfd40fe51e67d4bd7abc1ce
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>