Insert 'ans' into the calculator when applicable

Summary:
Previously, if the user entered "+2" or something similar into the
calculator, there would be a javascript error.
This commit makes +, -, *, /, and ^ insert the previous result if one
is available and the input box is currently empty.

It also fixes the setting of parseError so that errors in parsing are
caught by the calculator.

GIF: {F12375}

Test Plan:
  * Open an exercise with a calculator (like standard deviation)
  * put in some result (like 5)
  * click the + button, see that 'ans' gets inserted
  * put some other malformed input in, like 'sqrt(', hit enter
  * the calculator should error and there shouldn't be a javascript error.

Reviewers: alex, eater

CC: alpert

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