Stop socket listener when terminating by SIGTERM

- During the termination, StatsService is stopped while
StatsSocketListener is still running.
- This could cause invalid thread access.

Bug: 147316537
Test: Run a test app which keeps sending StatsLog and repeatedly execute
adb shell su root kill `pidof statsd`. statsd should not crash.

Change-Id: Iedd2dcb892f704bdba9adc864afa696de64b8e4c
1 file changed