Make related videos work with Perseus

Summary: (And refactor a little bit. Small webapp change also coming your way.)

Test Plan: Checked that exercises still load (without related videos in local mode). My topic tree only has one video so the live testing was a little harder, but it definitely shows up now for the Perseus exercise and seems to for the other exercise as well.

Reviewers: mattdunnrankin, benkomalo

Reviewed By: mattdunnrankin

Differential Revision: http://phabricator.khanacademy.org/D2885