New gallery app

This is an almost complete rewrite of the gallery app (which is unmaintained afaik), almost all server side logic has been replaced with client side code making the server side code only responsible for thumbnail generation and getting the list of images.

This also fully ajaxyfies the gallery.

I'm not entirely happy about the look, maybe @jancborchardt can have another look at that.

cc, maybe @blizzz or @DeepDiver1975