Fix scientific mantissa to not use localeToFixed

Summary:
`scientificMantissa` was being used to do math, but `localeToFixed`
was being called on its result, which prevented the math from working in
locales where commas are used instead of decimal points. This fixes that. Fixes
T1057

Test Plan:
Run `make i18n`, open the
multiplying_and_dividing_scientific_notation exercise on dev appserver with
lang=da. Ensure that the question and all hints are rendered correctly (no
`NaN`s, and all the numbers have commas instead of decimal points) and that the
correct answer is accepted.

Reviewers: csilvers

Reviewed By: csilvers

CC: alpert

Maniphest Tasks: T1057

Differential Revision: http://phabricator.khanacademy.org/D2781
Don't accept maxError if we don't specify inexact

Summary:
Before, if inexact was left as "required" but a maxError was still
provided, inexact answers could be provided and would be accepted. This fixes
the problem by changing maxError if the answer isn't supposed to be exact. I
could also try to change the logic down below to account for this, but I think
that this is the easiest way to fix.

Test Plan:
Add `data-max-error="100"` to the solution of an exercise, like
addition_1. Make sure that an answer 100 away from the correct answer isn't
still accepted.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2813
Remove extra hint, fix #50565

Auditors: emily
Use \blue, \green

Fixes #50790.

Auditors: emily
Fix missing cards bug

Summary:
`Exercises.currentCard` was being read out before it was updated with the
number of leaves that the student recieved, causing incorrect data to be sent
to the server. Then, when the data was read back, the incorrect number of
leaves was being shown.

Some background: In certain cases, students would get incorrect card progress
when they loaded an exercise with an incomplete stack. The cases where this
happened were when the data couldn't be loaded from the localStorage cache, and
thus had to depend on server data to show the cards. However, the server was
being sent incorrect data, so the cards were showing incorrect number of leaves.

Test Plan:
Log out. Go to an exercise (say /exercise/addition_1). Do some
problems (don't get 1 leaf), and make sure that you are now a phantom user.
Reload the page, and note that the number of leaves you recieved has been
maintained.

Log in. Go to an exercise, do some problems. Clear localStorage, and then
reload the page. Note that the number of leaves you recieved has been
maintained.

Reviewers: alpert, eater

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2872
Make related videos work with Perseus

Summary: (And refactor a little bit. Small webapp change also coming your way.)

Test Plan: Checked that exercises still load (without related videos in local mode). My topic tree only has one video so the live testing was a little harder, but it definitely shows up now for the Perseus exercise and seems to for the other exercise as well.

Reviewers: mattdunnrankin, benkomalo

Reviewed By: mattdunnrankin

Differential Revision: http://phabricator.khanacademy.org/D2885
Fix i18n issues in triangle_inequality_theorem

Summary:
This exercise was doing sentence building, as well as doing math on
`localeToFixed`ed numbers, which was causing errors. This fixes all of that.
Closes T1133.

Test Plan:
`make i18n`. Open the problem with lang=en. Ensure that all numbers
are shown with only one decimal place everywhere. Make sure that the math in
the hints makes sense (i.e. no rounding errors). Open the problem with lang=es.
Ensure that all of the strings are translated, that all the numbers use a comma
instead of a decimal point. Ensure that there are no `NaN`s, and that the
correct answer is accepted.

Reviewers: john

Reviewed By: john

CC: aatashparikh, alpert

Maniphest Tasks: T1133

Differential Revision: http://phabricator.khanacademy.org/D2882
Align multiplication exercises to common core

See https://trello.com/card/multiplication-exercises/5166dc745b4dc7926c000a71/113

Test plan: local

Auditors: alpert
Align division exercises to common core

See https://trello.com/card/division-exercises/5166dc745b4dc7926c000a71/114

Test plan: local

Auditors: alpert
Don't validate empty number answers

This only seems to come up in a multiple with, say, 2 text boxes. 1 is required, the other has fallback. The required one gets validated and was returning false until this change.

Test plan: Open division_2 and hit enter

Auditors: alpert
Align adding decimals exercises to common core

See https://trello.com/card/adding-decimals-exercises/5166dc745b4dc7926c000a71/115

Test plan: local

Auditors: alpert
Align subtracting decimals exercises to common core

See https://trello.com/card/subtracting-decimals-exercises/5166dc745b4dc7926c000a71/116

Test plan: local

Auditors: alpert
Align multiplying decimals exercises to common core

See https://trello.com/card/multiplying-decimals-exercises/5166dc745b4dc7926c000a71/117

Test plan: local

Auditors: alpert
Align adding fractions exercises to common core

See https://trello.com/card/adding-fractions-exercises/5166dc745b4dc7926c000a71/122

Test plan: local

Auditors: alpert
Align multiplying fractions exercises to common core

See https://trello.com/card/multiplying-fractions-exercises/5166dc745b4dc7926c000a71/131

Test plan: local

Auditors: alpert
fixed width fonts are now applied to code tags

Summary: fixed width fonts are now applied to code tags

Test Plan: fixed width fonts should be applied to code tags

Reviewers: emily, john

Reviewed By: john

CC: john, alpert, sophia

Maniphest Tasks: T1174

Differential Revision: http://phabricator.khanacademy.org/D2884
Restore the result of overzealous deleting

Test plan: Load exercise, take hints, verify there's no global var DUMMY

Auditors: alpert
Align equivalent fractions exercises to common core

See https://trello.com/card/equivalent-fractions-exercises/5166dc745b4dc7926c000a71/126

Test plan: local

Auditors: alpert
Handle null videos appropriately

Auditors: mattdunnrankin
Make number_line_* exercises mo'bettah

Test plan: local

Auditors: alpert