crosvm: with vcpus > 1 cleanly shutdown jailed processes
crosvm: with vcpus > 1 cleanly shutdown jailed processes

When creating a new vcpu, setup_vcpu() returns a JoinHandle which allows
the main thread to wait for the vcpu threads to complete. Put this
handle into a vector from which it will be later join()ed with to wait
for its execution to complete. By ensuring that the thread's completion
is waited for all the references to the ProxyDevice will be dropped and
thus the jailed processes will be sent a shutdown message and they will
cleanly exit.

TEST="crosvm run --cpus=2 ..." and observe that the jailed processes are
cleanly shutdown and not forcefully killed.
BUG=812234

Signed-off-by: Rob Bradford <c49e1dc14cd52e2644816db47123896e0ac79025@intel.com>
Change-Id: I771251ff1cdf762ca68c0781dc7de9f95cc1fcfe
Reviewed-on: https://chromium-review.googlesource.com/919165
Commit-Ready: Zach Reizner <3374927928a53d04457674c546bd4de57c2044ec@chromium.org>
Tested-by: Zach Reizner <3374927928a53d04457674c546bd4de57c2044ec@chromium.org>
Reviewed-by: Stephen Barber <7719587e4b5a49340661b214ec85602f3918d06f@chromium.org>
Reviewed-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>
Reviewed-by: Zach Reizner <3374927928a53d04457674c546bd4de57c2044ec@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm