Make log reader thread a class member

pushedEventThread references class members after detaching. Making
pushedEventThread as class member and joining in statsService
destructor. Adding a method to stop readLogs thread.

Ignore-AOSP-First: Bug is in still security triage and fuzzer is
crashing on startup.
Test: atest statsd_test
Test: m statsd_service_fuzzer && adb sync data && adb shell
/data/fuzz/arm64/statsd_service_fuzzer/statsd_service_fuzzer -runs=10000
Bug: 285645039
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3937ea3cdcf531a14cdba4ef176d8aa89d9d6066)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8dca7a8e0f241a041ac2e061c0070839aee560ff)
Merged-In: I91dadeaf8a14d2e41d272c0ebfac618bff255998
Change-Id: I91dadeaf8a14d2e41d272c0ebfac618bff255998
2 files changed