Add tests for a spare_dependencies method.

This method shall ensure that all packages to be removed are not
depended upon by anything in the system or in the transaction.
Mock spare_dependencies when testing update_pkgs
Add a spare_dependencies method.

This method ensures we don't try to remove anything that is depended
upon by anything that will be installed next.
Clean up caches and lock packages early.

We need to have package versions locked down before we can reliably
decide what to remove, or what dependencies to spare.
Ensure only packages that are not depended by anything else are removed
Run to spare dependencies iff there are packages to install or to remove.
Remove the tests for when wanted_pkgs fails.

This method cannot fail (it's a leaf method, only operates in memory,
blah blah blah).  Previous successes were due to a bug in the test
itself, and relied on some other part remembering it should fail.
Enhance how we clean up the call counters.

Return values are cleared up too.  So that we **really** can identify
who causes the exit with error.
Fix typo.
Cover all conditions in spare_dependencies
Remove misleading comment
Ensure update_pkgs calls spare_dependencies and handles its errors
Remove the semicolons in the set elements
Integrate the fix for #18