glthread: implement basic asynchronous glBitmap and glDrawPixels
This adds enough tracking of GL_UNPACK_* states that glthread can compute the size of image data passed to GL functions. By knowing the size, glthread can copy the image data into a glthread batch.
glBitmap and glDrawPixels are changed to execute asynchronously if the image size is small enough.