Add test for thread-attach naming behavior

The interaction between pthread_setname_np and AttachCurrrentThread is
not always obvious. Add a test to codify the interaction. Basically
AttachCurrentThread will always override the current
pthread_setname_np thread name, including if AttachCurrentThread is
called without an explicit name, in which case the pthread-name will
be changed to the name selected by java.

Test: ./test.py --host
Bug: 168655382
Change-Id: If0319b733dc808a4cb892b6199030657c3e69f81
6 files changed