fix an issue w/ submitting when the dialog is invalid

This fixes a few issues related to submitting a dialog with invalid fields:
- override `onClick` in spark dialog buttons, to ensure that we do not send the onclick event for disabled buttons
- check dialog validity before we submit via a 'trigger on return' field. Before, you could submit a dialog that had a disabled submit button, via hitting return in a 'trigger on return' text field.
- add the ability for spark dialogs to respond to whether it is valid

fixes #2322; @ussuri
This doesn't seem right to me. You're essentially blocking all click events at the DOM level from bubbling up from the button. The test in `where` should not have side effects on the objects of the sequence, it should just filter them by means of returning true/false.