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
(cherry picked from
Merged-In: I91dadeaf8a14d2e41d272c0ebfac618bff255998
Change-Id: I91dadeaf8a14d2e41d272c0ebfac618bff255998
2 files changed