Try to wait for DinD to stop before exiting

Wait up to 10 seconds for the DinD daemon to stop before exiting from
the build script. In my testing, allowing the daemon to stop fixes the
dangling loopback device issue.

Partial fix for #101