For some reason, when using `windosu`, the app is elevated three times.
However this only happens when the application is packaged for
distribution.
After a couple of days debugging this issue, we have no clue about
what's going on, but `elevator` seems to work fine.
Fixes: https://github.com/resin-io/herostratus/issues/29
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