close session right before the download starts - this enables parallel d...

...ownloads

fixes https://github.com/owncloud/apps/issues/1883

@karlitschek @craigpg bug fix -> backport stable7 requestes