nine/device: add draw call error checks and update vbuf/ibuf
nine/device: prevent LightEnable from corrupting memory
nine/resource: don't Release device if it hasn't been set
nine/query: don't GetData on virgin queries
nine/pipe: don't assert on invalid rects
nine/pdata: fix Set/FreePrivateData