Misc small fixes for input-number

Test Plan:
Render test.html succesfully

Auditors: aria
substate ke

This adds an `ArticleEditor` component that simply combines an Editor with
a Renderer, side-by-side. This allows us to create long-form article content
using Perseus.

Test Plan:
article.html and test.html both seem to work

Auditors: aria
Fix nesting of apiOptions

Test Plan:
Saw fancy dropdowns in *.html

Auditors: aria
Consistent coloring for functions in interactive-graph

Summary: All the function-types in interactive-graph (sinusoid, quadratic, linear) now
have consistent coloring; that is, they all have blue lines with orange points.

Test Plan:
- Run interactive-graph.
- Verify that Linear, Quadratic, and Sinusoid all have the same coloring scheme.

Auditors: aria
How react errors are destroying particles, and could set off nuclear reactions

Summary:
Be more lenient about prop types for ArticleEditor, given that
`Editor` and `Renderer` are reasonably happy about defaulting
content/widgets/images.

This change makes it safe to initialize a Particle with the
json "{}", which is wonderful for exposing a simple interface
to webapp.

Test Plan:
 * `make subperseus`
 * Make a new perseus article on the particles-draft branch
   in webapp
 * see no react alerts

Auditors: alex
Fixed bugs in MovableHelperMethods' `listen` and `unlisten` functions

Summary:
Previously, `listen` would break if you tried to add multiple handlers for the same
eventName and ID, and `unlisten` didn't properly re-index events after removing handlers from
an array. Both of these bugs are now fixed: calling `listen` with an eventName and ID that already
has a bound handler replaces the existing handler, and `unlisten` appropriately re-indexes the
listener map.

Test Plan:
- (This is easiest to test with MovablePolygon's click-to-add-points mode and an `update` call.)
- Added a bunch of `console.logs` in `listen` and `unlisten` along with some arbitrary `listen` calls in `MovableLine.update()`.
- Verified that `this._listenerMap` is re-indexed in `unlisten`.
- Verified that existing handlers are over-written, i.e., that calling `listen(eventName, id, f)` is idempotent for the same `f`.

Reviewers: aria

Reviewed By: aria

Differential Revision: http://phabricator.khanacademy.org/D14170
One mistake that ruined every grapher widget that ever lived in an article

Summary:
Use defaultProps on the grapher widget to make it not crash when adding
it to an article.

This is roughly because we render a default grapher before the first
prop change comes from the editor.

Test Plan:
 * open `article.html`
 * add a grapher widget

Auditors: charlie
2 features you should be careful to not disable

Summary:
Pass EnabledFeatures through article editors; default to
using mathquill and tooltips.

Test Plan:
Add an expression to article.html

Auditors: alex
2 Props mysteriously missing from the interaction widget

Summary:
Use defaultProps on the interaction widget to make it not crash when adding
it to an article.

This is roughly because we render a default interaction before the first
prop change comes from the editor; so we need valid defaultProps on the
widget instead of just the widgetEditor

Test Plan:
 * open `article.html`
 * add an interaction widget

Auditors: eater
Fix numeric-input articles with this one weird trick

Summary:
Use defaultProps on the numeric-input widget to make it not crash when adding
it to an article.

This is roughly because we render a default numeric-input before the first
prop change comes from the editor; so we need valid defaultProps on the
widget instead of just the widgetEditor.

Auditors: michelle
Convert remaining Perseus widgets to use graphie.parabola and graphie.svg

Summary:
The Grapher now uses specialized plotting functions for parabolas and
sinusoids. In addition, both the Grapher and interactive-graph use the new
version of graphie.parabola that takes coefficients as arguments (rather than
points, reducing code duplication).

Depends on D14029.

Test Plan:
- Run interactive-graph with type Quadratic. Verify that behavior and grading are as before.
- Run Grapher with type Quadratic. Verify that behavior and grading are as before.
- Run Grapher with type Sinusoid. Verify that behavior and grading are as before.
- Run Grapher with type Linear. Verify that behavior and grading are as before.

Reviewers: aria

Reviewed By: aria

Differential Revision: http://phabricator.khanacademy.org/D14030
Why number-lines never draw the last tick mark

Summary:
Well, now they do draw the last tick mark. They didn't because
they looped through `numDivisions` times, but if we want
`numDivisions` units on the number line, we need `numDivisions + 1`
ticks.

Test Plan:
Reload my particle with a number line in it; see that the last
tick is now drawn and labeled.

Auditors: michelle
Add bounding to points and lines

Test Plan:
Add an interaction widget, a movable point, and a movable line segment
Drag the point around to see that I can't drag it off the canvas
Change the constraints and drag the point around to see that it complies
Drag the line around to see that I can't drag it off the canvas
Change the constraints and drag the line around to see that it complies

Reviewers: aria

Reviewed By: aria

Subscribers: joel, michelle, alex

Differential Revision: http://phabricator.khanacademy.org/D14124
Add label support to interaction widget

Test Plan:
Add an interaction widget and label
Change the text of the label
Change the color of the label
Change the position of the label
Set the position of the label to (x_0, y_0 + 1) and add a movable point
Drag the point around and see the label follow

Reviewers: aria, alex

Reviewed By: alex

Subscribers: joel, michelle, alex

Differential Revision: http://phabricator.khanacademy.org/D14126
Add rectangle elements to interaction widget

Test Plan:
Add an interaction widget and a rectangle
Change color of rectangle
Change position, width, and height
Add a movable point
Set position and height to be dependent on x_0 and y_0
Drag point around and see expected behavior

Reviewers: aria, alex

Reviewed By: alex

Subscribers: joel, michelle, alex

Differential Revision: http://phabricator.khanacademy.org/D14127
Don't send ALL THE JSON with interaction widget attempts

Summary: Oh, but maybe we should go back to sending something in other cases... oops...

Test Plan:
Locally, add an interaction widget and hit the "score" button.
See the guess for the interaction serialized as an empty object.
Add another widget, enter an answer, and hit "score".
Notice that the answer *is* actually serialized and not just undefined.

Reviewers: aria

Reviewed By: aria

Subscribers: joel, michelle, alex

Differential Revision: http://phabricator.khanacademy.org/D14128
Added missing comma

Test Plan:
test.html works again

Auditors: eater
20 reasons to stay away from sections

Summary:
Ugh. I don't even like this. But it works.

Basically, this commit divides article editing/rendering into
"sections", which are visually indistinct, but separate editing
into horizontally-aligned sections. There will probably be more
options for sections in the future.

Test Plan:
 * Open the article.html editor
 * add, remove, and reorder sections
 * try preview and json modes

Auditors: alex
one component class i forgot to export which could have broken particles

Summary:
Export ArticleRenderer

Test Plan:
subperseus and see that article viewing in webapp works using
ArticleRenderer

Auditors: alex
Split sections into parts with this one weird trick.

Summary:
Allow you to copy-paste from an old section to a
new section created directly after it, including
widgets.

Test Plan:
Split a section in my negative numbers particle I'm
working on.

Auditors: alex