Fix for chunked uploading support in API.
Chunked uploading is currently only implemented by Upload Wizard,
but is supported in MediaWiki core. It's enabled in Upload Wizard
by setting $wgUploadWizardConfig['enableChunked'] to true.
When enabled, large files will be split into smaller chunks, by
default of 1 MB. This is done through a series of API POST
requests. The file is identified by means of a 'filekey' to
allow for continuation of uploads from previous offsets.
Previously broken behavior: Files were concatenated correctly,
but instead of the whole file, one of the chunks was uploaded
to the wiki. This was due to the API using the filekey of the
chunk, as opposed to the filekey of the whole file.
In addition, this change also cleans out the stash information
for both filekeys after the upload is complete.
[Patch set 2: Whitespace fix]
[Patch set 3: Move filekey result past status check]
Change-Id: Idac94e953676787f9516051e47c006525f198fd4