winsys/xlib: fix up allocation/dealloction of XImage