Added logarithm instructions to Expression widget

Summary: Expression widget's answer format instructions was missing logarithm,
both for base 10 and for arbitrary bases.

Auditors: jack
Fix categorizer so removing an item doesn't leave it ungradable

Test Plan:
In local perseus, add a categorizer with 3 categories and 3 items. Inspect the JSON and see this:

```
    "categorizer 1": {
        "type": "categorizer",
        "graded": true,
        "options": {
            "items": [
                "1",
                "2",
                "3"
            ],
            "categories": [
                "A",
                "B",
                "C"
            ],
            "values": [
                0,
                1,
                2
            ]
        }
    }
```

Remove one of the items and reinspect the JSON and verify there are the same number of values as items (previously values would be unchanged from above):

    "categorizer 1": {
        "type": "categorizer",
        "graded": true,
        "options": {
            "items": [
                "1",
                "2"
            ],
            "categories": [
                "A",
                "B",
                "C"
            ],
            "values": [
                0,
                1
            ]
        }
    }

Select the correct answer in the preview area, hit the score button, and verify in the console that the answer is graded as correct (previously it would be scored as incorrect).

Reviewers: joel, jack

Reviewed By: jack

Subscribers: jack

Maniphest Tasks: T2690

Differential Revision: http://phabricator.khanacademy.org/D9961
Add some comments and a TODO

Test Plan: none

Auditors: joel
Add better EnabledFeatures defaulting logic

Summary:
Mobile wasn't specifying enabledFeatures, and was getting errors
about it because we'd added an EnabledFeature since I wrote this.

I should have written the code this way originally so we didn't
run into this issue, but now is better than never

Test Plan:
loaded perseus locally and saw no errors
mostly crossed fingers
will deploy to iOS later to check for no errors

Auditors: alex
update movableline to be more like movablepoint in semantics

Summary:
I made a bunch of changes to MovablePoint when landing <Graphie> to make
MovablePoint's semantics make sense with <Graphie>. This diff should
propagate most of those changes to MovableLine.

Test Plan:
Make an interactive-graph and play with the line.
Make sure the visuals all look good and that grading works

Reviewers: eater, charlie

Reviewed By: charlie

Differential Revision: http://phabricator.khanacademy.org/D9983
Radio: Make labels work on mobile

Summary:
There is a long-standing mobile webkit bug with labels, where
clicking the text inside a label won't check the input correctly.

This diff adds onTouchStart and onTouchEnd handlers to the radio
labels that re-implement the label elements' functionality in
react, so that perseus radio labels work correctly on mobile.

This diff also changes the radio's implementation to use
pure controlled components, rather than grabbing the DOM state
of radio/checkbox inputs after an event occurs.

Test Plan:
On the web:
 * Tested grading various radios in normal chrome's test.html
In the mobile app:
 * Tested clicking on a wrong answer, then a right answer's text,
   and made sure that doing this on multiple questions graded
   correctly

Reviewers: eater

Reviewed By: eater

Subscribers: alpert, ben

Differential Revision: http://phabricator.khanacademy.org/D9962
more interactive things above mobile scratchpad

Summary:
This doesn't really fix the transformer mobile integration completely,
but it does help somewhat maybe

Test Plan:
Opened Decomposing fractions and Defining congruence through rigid
transformations in the mobile app

Reviewers: kasra

Reviewed By: kasra

Differential Revision: http://phabricator.khanacademy.org/D9910
interactive-graph: close click-to-add polygons

Summary:
This fixes the bug where polygons would load 'open' in the editor even
after they had been saved 'closed'. That is, if you saved a triangle
made in click-to-add-vertices mode, reloading the page would show just
two lines connecting three points, instead of a triangle.

This was caused by an incorrect check on creating the polygon editor,
which always created a new polygon as open if we were in click-to-add
mode. Insead, we now check for how many points we are adding with this
polygon, and if it is at least three, we close it, since any saved
polygon we are loading should be closed, and newly created click-to-add
polygons will have 0 points.

Fixes T2698

Test Plan:
Load [this local perseus item](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%5B%5B%E2%98%83%20interactive-graph%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22interactive-graph%201%22%3A%7B%22type%22%3A%22interactive-graph%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22step%22%3A%5B1%2C1%5D%2C%22backgroundImage%22%3A%7B%22url%22%3Anull%2C%22scale%22%3A1%2C%22bottom%22%3A0%2C%22left%22%3A0%7D%2C%22markings%22%3A%22graph%22%2C%22labels%22%3A%5B%22x%22%2C%22y%22%5D%2C%22showProtractor%22%3Afalse%2C%22showRuler%22%3Afalse%2C%22rulerLabel%22%3A%22%22%2C%22rulerTicks%22%3A10%2C%22range%22%3A%5B%5B-10%2C10%5D%2C%5B-10%2C10%5D%5D%2C%22gridStep%22%3A%5B1%2C1%5D%2C%22snapStep%22%3A%5B0.5%2C0.5%5D%2C%22graph%22%3A%7B%22type%22%3A%22polygon%22%2C%22numSides%22%3A%22unlimited%22%2C%22snapTo%22%3A%22grid%22%7D%2C%22correct%22%3A%7B%22type%22%3A%22polygon%22%2C%22numSides%22%3A%22unlimited%22%2C%22coords%22%3A%5B%5B-2%2C-2%5D%2C%5B2%2C-2%5D%2C%5B0%2C2%5D%5D%2C%22snapTo%22%3A%22grid%22%7D%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22hints%22%3A%5B%5D%7D)
and check that the polygon loads as closed in the editor.

Reviewers: charlie

Reviewed By: charlie

Maniphest Tasks: T2698

Differential Revision: http://phabricator.khanacademy.org/D10006
interactive-graph: hide click-to-add instructions if points

Summary:
When loading an existing item (in the editor only), the "click to
add points" message would obscure any points that were already present.
Since those points have already been added, this message probably
doesn't need to be on top of them.

Test Plan:
load [this local perseus item](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%5B%5B%E2%98%83%20interactive-graph%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22interactive-graph%201%22%3A%7B%22type%22%3A%22interactive-graph%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22step%22%3A%5B1%2C1%5D%2C%22backgroundImage%22%3A%7B%22url%22%3Anull%2C%22scale%22%3A1%2C%22bottom%22%3A0%2C%22left%22%3A0%7D%2C%22markings%22%3A%22graph%22%2C%22labels%22%3A%5B%22x%22%2C%22y%22%5D%2C%22showProtractor%22%3Afalse%2C%22showRuler%22%3Afalse%2C%22rulerLabel%22%3A%22%22%2C%22rulerTicks%22%3A10%2C%22range%22%3A%5B%5B-10%2C10%5D%2C%5B-10%2C10%5D%5D%2C%22gridStep%22%3A%5B1%2C1%5D%2C%22snapStep%22%3A%5B0.5%2C0.5%5D%2C%22graph%22%3A%7B%22type%22%3A%22point%22%2C%22numPoints%22%3A%22unlimited%22%7D%2C%22correct%22%3A%7B%22type%22%3A%22point%22%2C%22numPoints%22%3A%22unlimited%22%2C%22coords%22%3A%5B%5B-3.5%2C-2%5D%2C%5B4%2C-3.5%5D%2C%5B-0.5%2C4%5D%5D%7D%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22hints%22%3A%5B%5D%7D)
see that the click to add points message appears over the renderer, but
not over the editor

Reviewers: charlie

Reviewed By: charlie

Differential Revision: http://phabricator.khanacademy.org/D10007
Moved instructions-text styling from stylesheet to React component

Test Plan: Same as D9705. All passing.

Auditors: jack
Changed 'constrainted' to 'constrainted' and updated KE
Add inputting math doc.

Auditors: jack
Update inputting-math.md

Clarified some distinctions and removed uncertainty about how things work.

Auditors: joel
Revert "Radio: Make labels work on mobile"

This reverts commit 85c327c16ace15df38106424fc0b02485ebdbd60.

Summary:
I broke things :(

Auditors: eater
AnswerArea: Fix input-numbers in the answer area

Summary:
interceptInputFocus was being set on all inputs in the
answer area, making them readonly.

Test Plan:
Answer [this perseus item](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22**Fill%20in%20the%20missing%20value%20to%20make%20the%20table%20represent%20a%20linear%20equation.**%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%24x%24%20%7C%20%24y%24%5Cn-%3A%7C-%3A%5Cn%241%24%20%7C%20%244%24%5Cn%243%24%20%7C%20%2410%24%5Cn%246%24%20%7C%20%2419%24%5Cn%2412%24%20%7C%20%5B%5B%E2%98%83%20input-number%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22input-number%201%22%3A%7B%22type%22%3A%22input-number%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22value%22%3A%2237%22%2C%22simplify%22%3A%22required%22%2C%22size%22%3A%22small%22%2C%22inexact%22%3Afalse%2C%22maxError%22%3A0.1%2C%22answerType%22%3A%22number%22%7D%7D%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22hints%22%3A%5B%7B%22content%22%3A%22Linear%20equations%20can%20be%20represented%20in%20the%20form%20%24y%3D%5C%5Cblue%7Bm%7Dx%2B%5C%5Cpink%7Bb%7D%24%2C%20where%20%24%5C%5Cblue%7Bm%7D%24%20represents%20the%20slope%20of%20the%20equation%20and%20%24%5C%5Cpink%7Bb%7D%24%20represents%20the%20%24y%24-intercept.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22Two%20points%20always%20make%20a%20line%2C%20so%20let's%20use%20two%20of%20the%20points%20in%20the%20table%20to%20determine%20the%20linear%20equation%20for%20those%20two%20points.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22Let's%20find%20the%20slope%20first.%20%20Slope%20is%20the%20change%20in%20%24y%24%20over%20the%20change%20in%20%24x%24.%20%20%5Cn%5CnWe%20can%20find%20slope%20using%20this%20formula%3A%5Cn%24%5C%5Cblue%7B%5C%5Cdfrac%7By_2-y_1%7D%7Bx_2-x_1%7D%7D%24%5Cn%5CnLet%E2%80%99s%20use%20%24%5C%5Cgreen%7B(1%2C4)%7D%24%20and%20%24%5C%5Cpurple%7B(3%2C10)%7D%24%20to%20determine%20the%20slope%3A%5Cn%5Cn%24%5C%5Cblue%7B%5C%5Cdfrac%7By_2-y_1%7D%7Bx_2-x_1%7D%7D%3D%5C%5Cdfrac%7B%5C%5Cpurple%7B10%7D-%5C%5Cgreen4%7D%7B%5C%5Cpurple3-%5C%5Cgreen1%7D%3D%5C%5Cdfrac62%3D%5C%5Cblue3%24%5Cn%5CnSo%20the%20slope%20is%20%24%5C%5Cblue3%24.%20Whenever%20the%20%24x%24-value%20increases%20by%20%241%24%20unit%2C%20the%20%24y%24-value%20increases%20by%20%243%24%20units.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22Now%20let%E2%80%99s%20determine%20the%20%24y%24-intercept%20by%20plugging%20one%20of%20the%20points%2C%20%24%5C%5Cgreen%7B(1%2C4)%7D%24%2C%20into%20%24y%3D%5C%5Cblue%7Bm%7Dx%2B%5C%5Cpink%7Bb%7D%24.%5Cn%5Cn%24y%3D%5C%5Cblue%7Bm%7Dx%2B%5C%5Cpink%7Bb%7D%24%20%20%5Cn%24%5C%5Cgreen4%3D%5C%5Cblue3(%5C%5Cgreen1)%2B%5C%5Cpink%7Bb%7D%24%20%20%5Cn%244%3D3%2B%5C%5Cpink%7Bb%7D%24%20%20%5Cn%241%3D%5C%5Cpink%7Bb%7D%24%5Cn%5CnSo%20the%20line%20intercepts%20the%20%24y%24-axis%20at%20%24(0%2C%5C%5Cpink%7B1%7D)%24.%20%20%5Cn%24m%3D%5C%5Cblue3%24%20and%20%24b%3D%5C%5Cpink1%24%2C%20so%20the%20linear%20equation%20for%20these%20two%20points%20is%20%24y%3D%5C%5Cblue3x%2B%5C%5Cpink1%24.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22Now%20that%20we%20have%20the%20linear%20equation%2C%20let%E2%80%99s%20plug%20%24x%3D%5C%5Cred%7B12%7D%24%20into%20the%20equation%20to%20solve%20for%20the%20corresponding%20%24y%24-value%3A%5Cn%5Cn%24y%3D3x%2B1%24%20%20%5Cn%24y%3D3(%5C%5Cred%7B12%7D)%2B1%24%20%20%5Cn%24y%3D36%2B1%24%20%20%5Cn%24y%3D37%24%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22%2437%24%20is%20the%20missing%20number%20that%20will%20make%20the%20table%20represent%20a%20linear%20equation.%20%20The%20table%20should%20look%20like%20this%3A%5Cn%5Cn%24x%24%20%7C%20%24y%24%5Cn-%3A%7C-%3A%5Cn%241%24%20%7C%20%244%24%5Cn%243%24%20%7C%20%2410%24%5Cn%246%24%20%7C%20%2419%24%5Cn%2412%24%20%7C%20%2437%24%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%5D%7D)

Auditors: charlie
Steal the subperseus lock

Summary:
There seem to be bugs around several things, including
the radio (until that review or another fix lands), click-to-add
points, and maybe the number line. I'd like to lock subperseusing
until we've ran a better set of manual tests on these to verify
that things are working (or fix them).

Test Plan: `make all`

Auditors: eater
Added propTypes to Measurer and Dropdown

Summary:
Added some propTypes and refactored Dropdown so that the widget
doesn't know which choice is correct (instead grading itself via the rubric).

Reviewers: jack

Differential Revision: http://phabricator.khanacademy.org/D9894
Added propTypes to Measurer and Dropdown

Summary:
Added some propTypes and refactored Dropdown so that the widget
doesn't know which choice is correct (instead grading itself via the rubric).

Test Plan:
- Run Perseus.
- Load this [Dropdown and Measurer](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%5B%5B%E2%98%83%20dropdown%201%5D%5D%5Cn%5Cn%5B%5B%E2%98%83%20measurer%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22dropdown%201%22%3A%7B%22type%22%3A%22dropdown%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22choices%22%3A%5B%7B%22content%22%3A%22ABC%22%2C%22correct%22%3Afalse%7D%2C%7B%22content%22%3A%22DEF%22%2C%22correct%22%3Atrue%7D%5D%2C%22placeholder%22%3A%22Letters%22%7D%7D%2C%22measurer%201%22%3A%7B%22type%22%3A%22measurer%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22box%22%3A%5B480%2C480%5D%2C%22imageUrl%22%3Anull%2C%22imageTop%22%3A0%2C%22imageLeft%22%3A0%2C%22showProtractor%22%3Atrue%2C%22showRuler%22%3Afalse%2C%22rulerLabel%22%3A%22%22%2C%22rulerTicks%22%3A10%2C%22rulerPixels%22%3A40%2C%22rulerLength%22%3A10%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22hints%22%3A%5B%5D%7D). Confirm that there are no console warnings RE prop types.
- Confirm that the Dropdown grades correctly as well.

Reviewers: jack, eater

Reviewed By: eater

Subscribers: eater

Differential Revision: http://phabricator.khanacademy.org/D9894
Radio: Make labels work on mobile (non-broken?)

Summary:
There is a long-standing mobile webkit bug with labels, where
clicking the text inside a label won't check the input correctly.

This diff adds onTouchStart and onTouchEnd handlers to the radio
labels that re-implement the label elements' functionality in
react, so that perseus radio labels work correctly on mobile.

This diff also changes the radio's implementation to use
pure controlled components, rather than grabbing the DOM state
of radio/checkbox inputs after an event occurs.

This implementation makes the pseudo-label and checkbox
independent, to avoid the bug the last version of this caused.

Test Plan:
On the web:
 * Tested grading various radios in normal chrome's test.html
In the mobile app:
 * Tested clicking on a wrong answer, then a right answer's text,
   and made sure that doing this on multiple questions graded
   correctly
 * Now tested with multiple selections, both clicking on the
   checkboxes and the labels

Reviewers: eater

Reviewed By: eater

Subscribers: alpert, ben

Differential Revision: http://phabricator.khanacademy.org/D9962
Instructions text no longer uses point-events: none

Summary:
Click-to-add-points instructions text is now handled by the underlying Graphie,
allowing us to avoid usage of 'point-events:none', which doesn't have great browser support.
In graph.jsx:_setupGraphie(), the Graphie object adds a div containing its instructions text
and registers some event handlers to fade it in and out, and remove it on click. Fixes T2720.

Test Plan: Try [click to add points](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%5B%5B%E2%98%83%20interactive-graph%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22interactive-graph%201%22%3A%7B%22type%22%3A%22interactive-graph%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22step%22%3A%5B1%2C1%5D%2C%22backgroundImage%22%3A%7B%22url%22%3Anull%2C%22scale%22%3A1%2C%22bottom%22%3A0%2C%22left%22%3A0%7D%2C%22markings%22%3A%22graph%22%2C%22labels%22%3A%5B%22x%22%2C%22y%22%5D%2C%22showProtractor%22%3Afalse%2C%22showRuler%22%3Afalse%2C%22rulerLabel%22%3A%22%22%2C%22rulerTicks%22%3A10%2C%22range%22%3A%5B%5B-10%2C10%5D%2C%5B-10%2C10%5D%5D%2C%22gridStep%22%3A%5B1%2C1%5D%2C%22snapStep%22%3A%5B0.5%2C0.5%5D%2C%22graph%22%3A%7B%22type%22%3A%22point%22%2C%22numPoints%22%3A%22unlimited%22%7D%2C%22correct%22%3A%7B%22type%22%3A%22point%22%2C%22numPoints%22%3A%22unlimited%22%2C%22coords%22%3A%5B%5B-5.5%2C-5.5%5D%2C%5B-5.5%2C4%5D%2C%5B-1%2C4.5%5D%5D%7D%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22hints%22%3A%5B%5D%7D). Notice the instructions text, as well as how it fades in and out on mouse over and deletes on click. Also note that, in the editor pane, no instructions text is present as several points came pre-loaded.

Reviewers: jack

Reviewed By: jack

Maniphest Tasks: T2720

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