fix and test for https://github.com/Khan/live-editor/issues/203
Merge pull request #213 from kevinb7/issue-203

fix and test for issue 203
dry + function style fix
Merge pull request #214 from kevinb7/issue-203

issue 203 addendum: dry + function style fix
New challenge framework

Summary:
Adds two new kinds of tests:
 - scriptTest - run tests against the javascript on the page
   (all concatenated together)
 - uiTest - these tests are asynchrynous and can update their
   state any time using a callback. We will use them to test
   user interaction
There are no optimizations here yet. However it should perform decently.

Test Plan: Added tests

Reviewers: john, pamela

Reviewed By: pamela

Subscribers: #cs

Differential Revision: https://phabricator.khanacademy.org/D15373