Add Thread#join to guarantee the termination of the thread

Also add MonitorThreadLeak annotation to check thread leak.

Test: atest ConnectivityCoverageTests --test-filter mdns*
Change-Id: Ie47f30360e36784428173f6cc87a4a6b09826405
4 files changed