Stop using runCode directly.

Summary:
markDirty() is better because it properly throttles requests
(And this way we won't have rogue runCode's confusing it.)

Test Plan:
- Open PJS stratchpad
- See that it updates correctly

Reviewers: john

Subscribers: #cs

Differential Revision: http://phabricator.khanacademy.org/D14730
Fixes PJS flickering issue also some of T3392 (image resize flashing)

Summary:
The problem was that while replacing the number, number scrubber
it was sending an update between deleting the old value and inserting the new one.

Test Plan:
- Open PJS scratchpad
- Scrub value and see smooth update

Reviewers: pamela, john

Subscribers: #cs

Differential Revision: http://phabricator.khanacademy.org/D14733
An efficient technique for tag highlighting.

Summary:
It traverses the parseInfo created by slowParse to determine the correct node to highlight.
It highlights a node if either
1) you have a selection which contains just that element and none of its siblings.
Or 2) There is no selection and the cursor is inside the opening tag of an element

Test Plan:
(For alteration to code run flow):
- Open PJS scratchpad scrub a rectangle and see it move
- Introduce error which allways stop postMessage from returning into webpage code
- Open webpage scratchpad and see that output lags, but does still output

(For tag selecting)
- Watch "HTML: text emphasis" and see highlighting occuring correctly
- cursor from before an opening tag until after and see that it highlights an un-highlights at the right spots
- select from the end of the tag before to the start of tag after and see that the element still highlights
- select anymore and see that it does not highlight

Reviewers: pamela, john

Subscribers: #cs

Differential Revision: https://phabricator.khanacademy.org/D14893
Added tests

Test Plan: ^^
Fixed autosuggest flicker

Summary:
It used to be that if you moved your cursor along the bottom of the autosuggest tooltip the description text would flicker, because the descriptiond div covered the very bottom of the title span and the following occured:
-> mouse move
->description is on top therefore it is target
-> mouseLeave fires on title
-> hides description
-> now the mouse is over the title
-> fires mouseEnter on the title
-> shows description.

I fixed this by adding some spacing so the two divs don't overlap

Test Plan: Open pjs scratchpad, get autosuggest to pop up, move cursor along the bottom of the title, see no flicker.

Reviewers: pamela, john

Subscribers: #cs

Differential Revision: https://phabricator.khanacademy.org/D14954
Added function decorator to handle the "clean"/"running"/"dirty" workflow automatically
Do not lint for blockly

Test Plan:
Open PJS scratchpad, make syntax error, see oh noes
Open blockly scratchpad with profiling. See linting taking no time
Use sped up version of structured

Test Plan:
- Open snowman challenge
- Pass all tests
Re-ordered linting flow so that testing always occurs after injecting the code

This change was made because the webpage tests should occur against the DOM,
and the DOM must built built by injection, so that any scripts which assume document
refers to their document run correctly
WIP

Conflicts:
	build/js/live-editor.output.js
	js/output/shared/output.js
Decouple Testing

Test Plan:
<see below>
Throttle testing

Test Plan:
- Open snowman challenge
- Pass the challenge and observe tests responding
- Run regression tests
- Observere regression tests working
Many scratchpad performance improvements (targetted at iPad)

Summary:
The experience on iPad felt very laggy, so we tried to improve the performance. I made 3 major changes:
- Do not lint for block party (this is fine because block party can never have syntax errors)
- Use sped up version of structured (handles argument matching much faster)
- Decouple and throttle testing (it now tests at most once per 200ms, which leaves more time for display updates)

Test Plan:
- Open PJS scratchpad, make syntax error, see oh noes
- Open blockly scratchpad with profiling. See linting taking no time
- Open snowman challenge
- Pass the challenge and observe tests responding
- Run regression tests
- Observere regression tests working
- Run full liveEditor test suite (WIP, doing now, there are still some bugs there)

Reviewers: john, pamela

Subscribers: #cs

Differential Revision: https://phabricator.khanacademy.org/D14985
Hanging console.log
Needed to stub cleanUp for the tests.
Merge branch 'flicker' into perf

Conflicts:
	build/js/live-editor.ui.js
	js/live-editor.js
Merge branch 'highlight_tag' into perf

Conflicts:
	build/js/live-editor.output.js
	build/js/live-editor.ui.js
	js/live-editor.js
	js/output/shared/output.js
Rearrange text
Merge branch 'autosuggest_flicker' into perf
Hanging console.log
Merge branch 'perf'