Fix bugs (PowerRule, csc/cot, options.simplified, -1e^{x})

PowerRule called without 'new' operator

In CalcFunctions (an array of functions), the PowerRule function wasn't
called with a 'new' operator. It failed gracefully, but the variables
wouldn't be used (specifically, the variable name, if it wasn't 'x'
(i.e. 'y')wouldn't show up correctly). This commit fixes the problem
both ways: by adding the 'new' operator and also having the variables
come along for the graceful fail.

Corrected 'csc' and 'cot' in expressions

The code was copy/pasted from 'sec' but wasn't updated appropriately.

Fixed mixed-up property name

Changed options.simplified to options.simplify

Fix tex of negative expressions (-1e^{x} to -e^{x})

Should now pass the following cases:
- [-1] is -1 when alone b/c it's not part of Mul
- [-1*3] is -3 b/c Mul reduces numbers
- [-e^{x}], [-sin{x}] display correctly b/c the -1 is part of a Mul

Details:
- (line 1465) "var number = partitioned[0].reduce();" reduces a "-1"
with a hint "negate" to "-1" without the hint.
- (line 1364) Without the hint, it falls through to displaying "-1" in
front of expressions
- (line 1473) The fix adds the condition that if the numbers reduce to
a "-1" (i.e. (-1*-1*-1)) and the "-1" term in a necessarily
multi-element Mul then it has the negation hint.
Add support for sec, csc; combines exponents

Takes in the six common trig functions (sin, cos, tan, sec, csc, cot)
instead of just sin and cos, and does the following:
- breaks them down into sin and cos
- combines them into as many tan and cot as possible
- transforms those with negative exponents into their recipricals
- doesn't display 1 as exponent

Also, this commit orders the display of a Mul as [variables,
exponentials, logs, trigs, and then other expressions]. When multiple
variables exist ("x" and "y"), it orders them alphabetically.
Add differentiation capability to KAS

Add function 'differentiate' to all nodes (e.g. sum rule, product rule,
power rule, trig derivatives, log derivative) that returns an
expression (which you can then tex or differentiate again).

Add four helper functions:
- sameAs(other): checks if they have the same arguments.
- copy(): shallow copy of arguments (used primarily to copy unknown
expressions)
- contains(elem): (Expr) determines if any node in expression is
sameAs(elem)
- decrement(): returns a Num  decremented

One concern is that the time to 'simplify' a derivative may be on the
order of 100ms due to multiplicity of ways an expression can go through
factor/collect/expand functions. An option to semi-simplify (get rid of
zeros and ones) might be helpful here, especially so that the
derivative is recognizable when paired with the original expression.

The test.html is copy/pasted from the KAS project, with the addition of
test cases for 'differentiate'. Some test cases (outside of
'differentiate' fail due to lack of support for the unicode minus sign)

To pass tests, merge (partially) from KAS, and change answers:
- sin^2(x)cos(x) is now sin(x)tan(x)
- sin(x)/cos^2(x) is now sec(x)tan(x)
- -1x is now -x
- a+-1b is now a+-b

The function 'parseArray' takes a (nested) array [operator, args] and
parses it into an Expr. In this commit, there is only support for Int,
Float, Const (e and pi), Var, Add, Mul, Pow, Log, and Trig. (That is,
there is no Func, Eq, Const (i), Abs). Furthermore, it'll break when
given an argument like 'color'. This is an improvement (time, simplicity) over converting the array
into text and then parsing the text.

Fix:
-  NaN for Add(0,0) - it factors out a zero
Add simplify 'options' (changes defaults!)

Actually three separate options.

Changes defaults; now it will not expand Abs, Logs, and Pow (of type
x^(a+b); other types unaffected), if explicitly told to. Also updates tests.

In order to propogate the options throughout simplify, they are passed
throughout differentiate, divideThrough, isSimplified, asPositiveFactor
and asExpr (in addition to factor and expand). As well as every invocation of them.

An effort was made to make it backwards compatible. Hence the "x =
_.isObject(x) ? options.x : options" lines.

Also adds allAddTermsWith, allAddTermsWithout functions for the
exact_equations exercise. Primarily used to skirt integration.
Add exact_equations exercise

Exercise for exact differential equations. Makes heavy use of partial derivatives.

Uses generateMultivariateFunction() in calculus util. It generates
a function of x and y out of power, log, and trig functions.
Similar to CalcFunctions, but this handles multiple variables and
doesn't need wrong answers.

If necessary, it can be generalized further at some later date and the
switch statement can be moved into the exercise(s) as needed to meet
their specific needs. This function was originally much more concise,
but it generated functions that were either trivial or messy to
differentiate.

Within answer-types, it adds data-placeholder and data-empty within the
expression type. Designed for use with 'multiple' of 'expression' where one expression
may be left blank (exercise exact_equations).
- data-placeholder uses the html tag 'placeholder', which is supported
in all browsers (except <= IE9)
- data-empty just allows parsing of an empty input, and then
KAS.compare wil equate "" with "" (empty with empty).

Also, reparses solution, because 'multiple' makes it text.
Merge branch 'master' of https://github.com/Merbs/khan-exercises