WIP: improve automated testing

This is a work-in-progress branch to improve automated testing in a variety of ways, including readability improvements to the log output, fixes for intermittent failures, and the like. I'll push a bunch of changes to it before it's ready for review, partly to trigger a bunch of Travis jobs for testing these changes there.