Bugfix for MediaWiki 1.22+ compatibility

Fixed direct push of files to API via cURL. Had to change the way the
real filesystem path is resolved from new FileBackend mwstore://-path.
Also replaced direct creation of CurlHttpRequest object to proper factory
call. This is neccessary because new constructor is protected.

I have also fixed a little bug in the javascript part that prevented the
last file in list from being pushed.

Change-Id: Id54b574c57975c0f61e10c02aa7ed2cd0f431136
Merge "Bugfix for MediaWiki 1.22+ compatibility"