Generic stuff

Lets see how much we can break!!!
Work in progress
Move stuff to base file

They are base functionality despite dealing with photos.
Remove more obsolete code
Fix display of paginator.
Ancestors includes parents

This simplifies code at expense of small amount of duplication of
parent and ancestor fields in JSON output.
Fix another obsolete reference
WTF? Support going from page 1 to page 0 too.
Fix slideshow