Log errors

Log the following error types:
* filename errors
* upload errors
* API error for parsing custom license text (also fix a bug in the error handling code)
* API errors when saving the final text

Form validation errors are not logged.

Uses schema https://meta.wikimedia.org/wiki/Schema:UploadWizardErrorFlowEvent

Change-Id: I8bff7cc26210100ecf5930c4e9e063b441b14ed8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/903
Merge "Log errors"