fix disableWhileLoading for file upload formSubmits, fixes #7755
fix disableWhileLoading for file upload formSubmits, fixes #7755

inputs were getting disabled just prior to the iframe post, which caused
nothing to get sent in ie or safari (chrome and ff were ok though). this
changes the behavior so that inputs get disabled just after the form
submits (or not at all, if the deferreds are resolved synchronously)

this wasn't an issue for normal formSubmits, since the form values were
extracted prior to disabling the form, and sent via ajax

test plan:
1. ensure that you can send conversation attachments in ie, ff, chrome and
   safari
2. ensure that disableWhileLoading performs normally in other scenarios in
   those browsers. e.g. use the recipient finder a bit and confirm that it
   gets disabled when a request is in flight and enabled when the data
   comes back

Change-Id: If9eb1e6a24ed774d95feb01be5769816fef22ff8
Reviewed-on: https://gerrit.instructure.com/9624
Reviewed-by: Jon Jensen <44f878afe53efc66b76772bd845eb65944ed8232@instructure.com>
Tested-by: Hudson <dfb64870173313a9a7b56f814c8e3b33e268497a@instructure.com>

venturehive/canvas-lms,merichar/canvas-lms,SwinburneOnline/canvas-lms,SwinburneOnline/canvas-lms,wye0220/shindig-canvas,Unow/canvas-lms,samuels410/greatlakes-lms,arrivu/hoodemo,leftplusrightllc/canvas-lms,sfu/canvas-lms,tgroshon/canvas-lms,arrivu/qibla-ecampus,landonwilkins/canvas-lms,jay3126/canvas-lms,rup/Tarrax,whalejasmine/canvas-lms,arrivu/hoodemo,fronteerio/canvas-lms,wrdsb/canvas-lms,skmezanul/canvas-lms,grahamb/canvas-lms,SwinburneOnline/canvas-lms,ShreniiNepal/shrenii_lmp,antoniuslin/canvas-lms,sdeleon28/canvas-lms,tgroshon/canvas-lms,venturehive/canvas-lms,arrivu/arrivu-lms,Jyaasa/canvas-lms,landonwilkins/canvas-lms,parbros/red-innovadores-lms,shidao-fm/canvas-lms,roxolan/canvas-lms,rup/Tarrax,ankithbti/canvas_lms,redconfetti/canvas-lms,sdeleon28/canvas-lms,arrivu/jigsaw-lms,fronteerio/canvas-lms,utkarshx/canvas-lms,HotChalk/canvas-lms,fronteerio/canvas-lms,usmschuck/canvas,Unow/ins,landonwilkins/canvas-lms,roxolan/canvas-lms,wrdsb/canvas-lms,loganrun/pincan,roxolan/canvas-lms,antoniuslin/canvas-lms,utkarshx/canvas-lms,sli7246/canvas_branch,kyroskoh/canvas-lms,sli7246/canvas_branch,nditech/red-innovadores-lms,jay3126/canvas-lms,wrdsb/canvas-lms,djbender/canvas-lms,redconfetti/canvas-lms,grahamb/canvas-lms,efrj/canvas-lms,em2/canvas-lms,Rvor/canvas-lms,wye0220/shindig-canvas,landonwilkins/canvas-lms,sdeleon28/canvas-lms,leftplusrightllc/canvas-lms,arrivu/jigsaw-lms,Unow/canvas-lms,greyhwndz/canvas-lms,tgroshon/canvas-lms,utkarshx/canvas-lms,grahamb/canvas-lms,arrivu/arrivu-lms,kyroskoh/canvas-lms,nditech/red-innovadores-lms,venturehive/canvas-lms,juoni/canvas-lms,nditech/red-innovadores-lms,utkarshx/canvas-lms,arrivu/hoodemo,leftplusrightllc/canvas-lms,SwinburneOnline/canvas-lms,antoniuslin/canvas-lms,merichar/canvas-lms,loganrun/pincan,wimemx/Canvas,djbender/canvas-lms,efrj/canvas-lms,va7map/canvas-lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,Unow/ins,sfu/canvas-lms,roxolan/canvas-lms,parbros/red-innovadores-lms,skmezanul/canvas-lms,ankithbti/canvas_lms,arrivu/jigsaw-lms,venturehive/canvas-lms,tgroshon/canvas-lms,merichar/canvas-lms,shidao-fm/canvas-lms,wye0220/shindig-canvas,HotChalk/canvas-lms,redconfetti/canvas-lms,greyhwndz/canvas-lms,Unow/ins,Jyaasa/canvas-lms,ShreniiNepal/shrenii_lmp,wrdsb/canvas-lms,greyhwndz/canvas-lms,grahamb/canvas-lms,ShreniiNepal/shrenii_lmp,nditech/red-innovadores-lms,rup/Tarrax,usmschuck/canvas,samuels410/greatlakes-lms,skmezanul/canvas-lms,skmezanul/canvas-lms,whalejasmine/canvas-lms,Rvor/canvas-lms,whalejasmine/canvas-lms,em2/canvas-lms,djbender/canvas-lms,redconfetti/canvas-lms,Jyaasa/canvas-lms,va7map/canvas-lms,wimemx/Canvas,va7map/canvas-lms,sli7246/canvas_branch,arrivu/arrivu-lms,sfu/canvas-lms,arrivu/qibla-ecampus,sfu/canvas-lms,Rvor/canvas-lms,HotChalk/canvas-lms,loganrun/pincan,kyroskoh/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,jay3126/canvas-lms,ankithbti/canvas_lms,HotChalk/canvas-lms,Rvor/canvas-lms,greyhwndz/canvas-lms,va7map/canvas-lms,grahamb/canvas-lms,leftplusrightllc/canvas-lms,efrj/canvas-lms,juoni/canvas-lms,juoni/canvas-lms,usmschuck/canvas,Unow/canvas-lms,usmschuck/canvas,samuels410/greatlakes-lms,juoni/canvas-lms,efrj/canvas-lms,antoniuslin/canvas-lms,arrivu/qibla-ecampus,samuels410/greatlakes-lms,wimemx/Canvas,whalejasmine/canvas-lms,ShreniiNepal/shrenii_lmp,djbender/canvas-lms,sdeleon28/canvas-lms,jay3126/canvas-lms,sfu/canvas-lms,fronteerio/canvas-lms,kyroskoh/canvas-lms,em2/canvas-lms,parbros/red-innovadores-lms,Jyaasa/canvas-lms