Revert "Remove logging to stdout."

This reverts commit 5c222797d75bb41947c2b95695045f77f9d554ee.
Merge branch 'master', remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'origin/master' into log-to-console
Revert "Print, and log, messages in command-line utilities."
Fixed various tests.
Tests no longer run automatically when imported.
aggregate_tests now loads all the unit tests into one suite and runs them together,
so that any failures and errors show up together in a concise report.
Minor changes following review