Modify getters/setters of ByteBufferAs*Buffers

Added a different set of methods in DirectByteBuffer and HeapByteBuffer
to handle request from the ByteBufferAs*Buffers. The getters and setters
in ByteBufferAs*Buffer check limits instead of getters and setters of
Heap/DirectByteBuffer, therefore it becomes easier to maintain
local properties.

The change avoids making an extra copy of Heap/DirectByteBuffer at
the time of initialization.

Bug: 26020981
Bug: 6085292
Change-Id: I8af6ab60ec00b3eb9564d2fafad14bef6e61c15f
9 files changed