Bug 1055897 - [settings] add settings panel support

Let's use `options.onSubmit` and `options.onCancel` for dialogs.

`options.onSubmit` will return a promise with the result from the dialog. If the promise rejects, the dialog will remain opened. So does `options.onCancel`.