Make hidl_vec/hidl_string safe for 32<->64 IPC.

Pointers going over IPC always need to be 64-bit.
This change introduces a hidl_pointer class that
wraps a pointer (without taking ownership), and
stuffs it in a union with a uint64_t to ensure we
always have 64-bits.

We can map size_t to either a fixed 32-bit or fixed
64-bit type. Since sending objects of more than
2^32 bytes seems a while out, we can save ourselves
4 bytes by allowing a maximum of 2^32 elements in
hidl_vec, and 2^32 characters in a string.

Bug: 32089785
Test: hidl_test, hidl_string 32->64->32
Change-Id: Ife77f7362013226aada51c7686e33494390824d7
2 files changed