st/mesa: move some st_cb_drawpixels.c code, add comments