Add beforeSubmit callback

I added an option for defining a before submit callback. The option val is a function defined in the scope. This is called before the submit and the iframe is generated. If the callback returns false, the submit is canceled.

I have a use case that roughly translates to:  User's session times out -> They upload an image -> They get a blank screen. This is due to the iframe handling the upload, but failing because the session timeout. The BeforeSubmit callback lets me verify they have access before starting up the upload.