Cherry-pick changes implementing cross-wiki JavaScript uploads (addendum)

Authored by matmarex.


Cherry-pick changes implementing cross-wiki JavaScript uploads (addendum)

Several more commits fixing some important issues. Hopefully that's
all. Follow-up to 03e6ac38bf51456d9035b58040422358c41939f7.

Change 86dedee has a small merge conflict in Resources.php.

List of cherry-picked commits follows.

6318b4a ForeignStructuredUpload: Depend on mediawiki.widgets.DateInputWidget
052e91b mw.Upload.BookletLayout: Pass image info when emitting the fileSaved event
663629c mediawiki.Upload: Don't choke on nameless or dateless files
86dedee mw.ForeignStructuredUpload: Provide category suggestions from the right wiki
f0bfcb9 mw.ForeignStructuredUpload: Rearrange messages to always display license name
de1fa2b mediawiki.api: Don't hold references to finished requests forever

Change-Id: I89c51012812897d2b262259138a28579eb4b8429