Streamling, test, and fix issues with image uploading

* Remove a lot of unnecessary code.
* Test all cases in file submission.
* Make image submission more generic, and allow any files.
* Give students more specific error messages.
* Do some file validation in-browser to avoid round-trips to the LMS.
* Fix issue with submit button not appearing when file upload failed.

@brianhw Please review.