mapfishapp - implements the ability to download a remote file (#754)

The feature request should address the need of loading a remote file (by wiring the existing "upload geo file" feature), letting the server download the file by itself, then load it as a new layer.

In the meantime, this PR shall address a race condition error in the fileUpload controller, and a little bit of refactoring.

Test: testsuite OK, manual test OK, no new unit tests added.