libbinder_ndk: test Bp destruction

When sending a binder to another process, there are two things that
delay the destruction:
- there is a separate queue, flushed with 'flushCommands' that must be
emptied in the remote process
- the client thread must process the refcount loss asynchronously

This CL works around both of these problems by explicitly flushing
commands and waiting for the thread to process the refcount.

Bug: 148287051
Test: libbinder_ndk_unit_test
Change-Id: I2687b429faae659d80406f0b418c96a1eb40e9bd
4 files changed