Fix pointer arithmetic for ByteBuffers with non-zero positions

When initializing a gpu resource from a Java ByteBuffer with a non-zero
position, most functions aren't releasing the correct pointer and
subsequently crash the app.

Bug: 67109954
Test: build, flash, atest android.opengl.cts.ByteBufferTest

Change-Id: Id0910efd8c5ed6e00ea10eab89e77d97fe642d2b
7 files changed