Currently we fire and forget `sudoPrompt.exec()` and run a timeout for
`process.exit(0)` right away, however this means that the timeout will
start as soon as the elevation dialog is shown when no sudo cache exists
and therefore the timeout will finish before the user can type his
password and submit.
The fix is to keep the parent alive until the children dies, but call
`app.dock.hide()` to make the parent completely invisible to the
operating system.
Fixes: https://github.com/resin-io/herostratus/issues/31
Currently, the parent application will not be closed until the children
process is closed, leading to two Herostratus applications running at
the same time on OS X.