Add sleep in SuspendAllDaemonThreadsForShutdown

Only sleep if there are still daemon threads. Since we have already
shutdown the runtime daemons, this is a rare case. The goal of the
sleep is to leave daemon threads time to become blocked in a place
where they ideally will not touch runtime state.

Bug: 26483935
Bug: 18577101

Change-Id: Iad12209e771720523620e0a3829a75ec4647f58b
1 file changed