Make answer types much more modular, and more internally consistent

Summary:
Separate answer-type creation into two steps, setup (where the answer area is
messed with) and validator creation (where a function to validate solutions is
created). These two may only communicate by a "guess" variable, generated by
the setup portion and evaluated by the validator portion. This allows for
cleaner and less hacky code, and also allows for multiple solutions to be
validated using the same setup.

Some of the khan-exercise.js code had to be modified to make this work
correctly, but most of the changes come from the rework of answer-types.js

Test Plan:
Go through lots of exercises and make sure that they still work, and that the
timeline still works with their answers

Reviewers: eater

Reviewed By: eater

CC: alpert

Differential Revision: http://phabricator.khanacademy.org/D793
Fix set answer type

... I think.

Auditors: xymostech, eater
Remove our 3-layer redundant snapping

For some reason, we perform snapping 3 times, instead of the required 1.
This apparently leads to some problems. I'm not sure why these problems
occur, but they do, and this fixes them.

Closes 31738, 31739
Merge pull request #31742 from xymostech/fix-snapx

Remove our 3-layer redundant snapping
Fix radio answer type to require selecting an answer and be whitespace insensitive

Test Plan: Tested limits_1 and expected_value exercises in devappserver. Checked that unselected radio couldn't be selected, correct answer was accepted, and history showed up in coach reports.

Reviewers: emily

Reviewed By: emily

Differential Revision: http://phabricator.khanacademy.org/D838
more -> at least

Test Plan: Tested locally

Reviewers: stephanie, yunfangjuan

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D837
Fix two with combining_like_terms_2:

Summary:
In the ax_fbx_fd problem type, the variable coefficient could simplify to 0
and require entering "0x+5" instead of just "5", for example. Added a data-ensure
to ensure the coefficient is always non-zero.

Also, the final hint in the eax_ec_fd_fbx problem type left off the constant
term unless it was 0 instead of the other way around.

Test Plan:
Test locally to verify the two problems were fixed in these two seeds:
http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/combining_like_terms_2.html?seed=62&problem=ax_fbx_fd&debug
http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/combining_like_terms_2.html?seed=42&problem=eax_ec_fd_fbx&debug

Reviewers: stephanie, yunfangjuan

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D843
Fix to rate_problems_1 to ensure the givens make sense

Summary:
Previously one of the distances could be zero, so the given average
speed didn't make sense. (How can you have an average speed over zero distance?)
This just ensures neither distance is zero.

Test Plan: Tested locally outside devappserver

Reviewers: stephanie, yunfangjuan

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D848
Make sure fractions doesn't incorrectly show -1

I think this was a typo because the same structure
(solution > 0 ? 1 : -1) is used several times afterwards as well.
Fix the same error in fractions 3
Merge pull request #31899 from xymostech/fix-fractions-negative

Make sure fractions doesn't incorrectly show -1
Back out new answer-types.js for now

Auditors: emily, eater
Add exercise: Multi-step equations with distribution

Test Plan: Lots of testing of each problem type in local mode

Reviewers: stephanie, yunfangjuan

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D815
Solved issue #32130.
Add exercises: Multiplying a matrix with a vector, multiplying a matrix with a matrix, matrix dimensions, and defined and undefined matrix operations

Summary:
- Add 4 exercises
- First pass at question-based hints

Test Plan: Tested locally

Reviewers: eater

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D856
Merge pull request #32141 from mirandaconrado/PythagoreanIdentities

Fix #32130
Rewrite "Writing expressions 1"

Summary: Based on Jesse's spec.

Reviewers: eater

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D859
Remove middle newline out of three

Auditors: eater
Update exercises/graphing_circles_2.html

Closing span tag was missing /
Fixes #32319 Graphing circles 2 - error in hint
and #32053 Graphing circles 2 - Solution has a typo
Merge pull request #32352 from karlanderson/patch-1

Update exercises/graphing_circles_2.html