Wait for thread termination in PreZygoteFork()

This should be more robust than checking /proc/self/task through the
Java API.

Bug: 299221079
Bug: 304183774
Test: Build and boot AOSP, TreeHugger
Change-Id: I6f48ee593eaea96d231e5a6ddda070eaf07468ac
3 files changed