Fix error handling in "Upload Diff" and "Add File" dialogs.

These dialogs are still driven by some pretty ancient javascript code in
common.js. All the backend code had been changed to use the new resource
models, but the error handling callback hadn't been updated for the new
attributes. The result of this was that instead of seeing an error in the form,
users would just see an endless "Loading..." spinner.

Testing done:
- Tried to upload a .png file instead of a diff and saw the error shown next to
  the 'diff' field.
- Tried to submit the 'Add File' form without selecting a file and saw the
  error shown next to the 'path' field.

Fixes bug 3413.

Reviewed at https://reviews.reviewboard.org/r/6112/