Reorganize startup/shutdown code in SyncManager DO NOT MERGE

* Move all thread-related startup code into run()
* Move all thread-related shutdown code into new method shutdown()
* Add appropriate synchronization during startup/shutdown
* Add thread names to worker threads

Bug: 2790929
Bug: 2645835

Backport of: Idbd35892cea3de5fbd365102a62103b2f0bdf6c9
Backport of: Ib12a70222ac3fd9e65bec3834c0aae061858776c

Change-Id: Idfd1c9ac7fbe8ce6859b1933ab6d287e3cb0d2e9
2 files changed