Move ThreadDeath event before clearing Thread.nativePeer

We were clearing the Thread.nativePeer field prior to calling
ThreadDeath event. Since this event can call into user-supplied code
we want to call it before we do any real cleanup.

Test: ./test.py --host -j40
Bug: 62117833

Change-Id: I6b93d82d23946c07dfbeb837d841339108e4b084
1 file changed