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
So, I'm logically converting this from a `someone clicked on me at x,y` event to a `my button action was performed` event. Before, even if the button was disabled it would (on some platforms) still fire its `onClick` event. Also, on the same platforms, merely not firing an event from here will not prevent a spark dialog from closing. The overlay is also listening for mouse clicks from submittable items. So, clicking on a disabled submit button would cause the dialog to be closed.

It's necessary to both filter events from disabled buttons, and to consume all click events, disabled button or no. Consuming them prevents the overlay from closing the dialog.