Adds "back" link on photo detail view.

Also fixes a bug that would cause photo index view to list duplicate
photos in the list after back link was clicked.