New galleries

This is a major refactoring.

* All the code in gallery creation is now split into reasonably-sized functions
* It reuses posts to do gallery descriptions and titles
* Gallery descriptions can be translated
* Galleries themselves are now reproduced (with only one copy of the images) for each language

This is part of Issue #786 

Please review harshly, it's a large change and things slip.