Fix single solution test and how identical inequalities are dealt with

Summary: The key changes are on lines 73 and 129. The other changes are cosmetic or to help me figure out what's going on.

Reviewers: eater

Reviewed By: eater

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