Subexpressions evaluation order

Nested subexpressions should work now, closes #74.

I refactored ``Equations._sort_static_equations`` into a new ``utils.topsort`` as suggested by @mstimberg.

All tests pass on Windows.