Pictures: don't use thumbnail maps for album thumbnails

instead only load a single thumbnail image for albums as first and replace them on mouse hover
decreases the amount of data needed to be loaded and fixes the stuttering on scrolling if a lot of albums are on the screen
Pictures: use a queue for loading thumbnails to improve responsiveness while loading thumbnails
Only load one album thumbnail at a time
Pictures: Allow exiting the slideshow using the back button
Pictures: Hide scrollbar during slideshow
Pictures: Make sure loading thumbnails doesn't block loading slideshow images
Pictures: Preload the next image in the slideshow
commenting console log for now
fix navigation
slideshow.js: fitting the image correctly, refactoring, fixing preload issues, ...

I just reapplied my changes to the current master. This is a hack to avoid the effort of rebasing #1106.

It is is fixing #1073, #1074 and some other issues.
Conflicts:
	gallery/js/slideshow.js
fix an encoding issue in safari

Conflicts:
	gallery/js/gallery.js
pictures: hide spinner once image is loaded

fixes #1269

Conflicts:
	gallery/js/slideshow.js
Pictures: don't scale images that wont fit the screen even after scaling
Merge pull request #1332 from owncloud/gallery-backports

Gallery backports