Don't glMapBufferRange on the host if possible

It is expensive to

- let glMapBufferRange to the host at all
- read from the GPU mapped pointer when on the host

The second item will introduce a stall similar to
glClientWaitSync/glFinish on the host GPU.

Thus, track when the buffer is possibly dirty and only read from it
during those times. At other times, mapped buffers that are only used
for write can be implemented in a completely feed-forward way.

Change-Id: Ife9393e4eb5238411e6eae0abb49272523a8d935
4 files changed