libbinder: attachObject APIs work with threads

These APIs now return values so that they can be used in a
multi-threaded environment without needing additional locking.

Bug: 192023359
Test: binderLibTest
Change-Id: Idc9054bde869a57c2cb5142963aae362674ce0c0
7 files changed