User:MarkTraceur/UploadWizard/Refactor

There was some discussion about refactoring bits of UploadWizard, so I figured I'd make a tasks page.

Add/remove flow
The big nasty-looking array that we use for keeping lists of uploads really needs to be fixed. bugzilla:39746 is the initial bug reporting the issue, but User:TheDJ recently ran up against the problem in gerrit:65318, so maybe we should revisit it.

What it looks like now
Basically we just push UploadWizardUpload objects onto an array, then when we delete them, we put something falsy in their place. We don't splice the array or anything, which is weird, because apparently other bits of the code expect the index to never, ever change.

What it should probably look like
The bits of the code that expect an Upload object to always be in the same place need to change. We should have callbacks and references that refer to the uploads, not hacky dependencies on uncertain aspects of arrays. Maybe even have a specialized UploadList class that can keep track of this complexity for us, rather than trying to hack in the complexity all over our codebase.