Fix bug with photo review image loading

Approving or Rejecting a photo causes the next image to load, which was
happening even when there was no next page.
Clean up JS on photo review page

 - Break page existence check into named function
 - Look for page elements inside passed in container
Merge pull request #1377 from maurizi/photo-review-bug-fix

Fix bug with photo review image loading