IMemory: add read/readRange APIs.

These are required for efficient remoting of HIDL hals. If someone on
the remote side is only reading, we no longer need to copy the entire
chunk of memory over.

Test: hidl_test
Bug: 35328065
Change-Id: I55bf3e5ef4ba2054105e4e8ce9aa2e490a8cf167
3 files changed