mesa: consistantly use mesa memory-functions in gallium state tracker