fix double loading templates as widgetFile does all
some code cosmetics and haddock
view fixes
Added gallery browser. Modified gallery access rules.

As gallery access rules were becoming totally inefficient
recursively querying the database, the whole thing got simplified.
Now every gallery is accessible for everyone, but images might not
show up, depending on whether any images are accessible. We don't
generate links for galleries that don't have - or any of their
descendants don't have - a visible image.