Fix crash when showing error dialog before GUI environment is initialized

This PR adds `dialog.showErrorBox` API which uses the safest way to prompt the error message to user, so error dialog can still show before GUI environment is initialized.

Fixes https://github.com/atom/atom-shell/issues/785.