Refactor checks into a loop

Summary:
Just a simple refactoring to remove some duplication in the checks for if the
graph has changed.

Test Plan:
* Open an interactive graph
* Make sure changing the properties causes the graph itself to change

Reviewers: alex

Reviewed By: alex

CC: alpert

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