Properly format expressions like "1/(2x)"

Summary:
Previously, expressions like 1/(2x) would be displayed as (1/2)/x, which was
confusing to some users. This commit changes the way equations like this are
displayed to display them as 1/(2x).

I had to change some of the existing tests to get this to work nicely, the only
test I wasn't too confident changing was the one for "1*-2*3/4/5", but I
decided that based on the design ideas at the top (embrace commutativity), this
was reasonable.

Reviewers: alex

Reviewed By: alex

CC: alpert

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