Fix solving_for_the_y-intercept JS error in local mode

Summary:
When loading the exercise in local mode, the <script> block would immediately
run before `KhanUtil` was defined, resulting in the screen-grabber-thing
complaining about `ReferenceError: Can't find variable: KhanUtil`. Instead
since the p1Position function is only called once, I just unfactored the logic
into that one place.

I also noticed a separate bug when testing where the graph dimensions weren't
always computed properly, so I kinda made that a little better.
(check out the last hint at http://sandcastle.kasandbox.org/media/castles/Khan:master/exercises/solving_for_the_y-intercept.html?debug&problem=given-point&seed=129)

Test Plan:
Load http://exercises.ka.local/exercises/solving_for_the_y-intercept.html?debug&problem=given-point and don't see a JS error in the console. Take hints and see things work.
Load http://exercises.ka.local/exercises/solving_for_the_y-intercept.html?debug&problem=given-point&seed=129 and take all hints. Notice the graph in the last hint is less insane.

Reviewers: emily

Reviewed By: emily

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