Android O MR1 Preview 1
Fix ownership of objects returned by VintfObject::Get*

VintfObject::Get* is not thread-safe; the raw pointers
returned to clients can be invalidated by another thread
that calls the same VintfObject::Get* with skipCache = true.

Fix this by sharing ownership to callers as well.
VintfObject::Get* now returns a shared_ptr, and clients
can destroy the shared_ptr once they finish reading it.

Test: libvintf_test
Test: vintf_object_test
Test: `adb shell vintf` shows compatible

Bug: 65166415

Change-Id: I931cf0864a8dba3d83fe41f715b94e1a21b266eb
3 files changed