Add sorting to make package generation consistent across runs
Cleanup Package ordering

Now packages have a total order, and they only compare equal if they are
equal.
Clear the Resolve cache in each test
Remove no longer relevant comment
Some cleanups and tests for the eq generation code
Fix some typos
Add ability for raises to check for a substring

This is necessary because so many different errors are just RuntimeError.
Make sure the unsatisfiable packages raise the right error

Add some nonexistent package tests.
Spelling
Fix some tests
Move check for nonexistent packages to get_pkgs
Improve an error message
Get all packages (not just max) in the features code
Use get_pkgs (not get_max_dists) in find_substitute
Fix imports in the tests

Previously they did not work when py.test was called from a different
location. This required making the tests a package (adding __init__.py).
Print specs to debug

This helps when the hint code runs.
Check for unsatisfiability separately

Since we don't have to add any constraints to see if the specs are
unsatisfiable, this is fast, whereas bisecting the whole constraint space for
an unsatisfiable spec is very slow.
Optimize for better solutions

We keep the midpoint no more than 10 above the low, which keeps the code fast
for good solutions even if there is a high upper bound.

10 was arbitrary, but seems to work well. For conda install python=2.6
anaconda (run from Python 3), the value needed is 8.

There is still some optimization needed, though. For conda install python=2
numpy=1.6 anaconda, the optimal value is 72, which takes several minutes to
achieve.
Fix some indentation
Make Linear a little more efficient.

Use properties instead of defining things in initializer for things that might
not be used, especially for subequations in the BDD algorithm.