Move logging, updating and testing utils into common directory

This is part of a series of PRs which add up to a substantive change.

I used '.' in import statements in some places to bring the symbols into the current namespace, to reduce the quantity of diffs in this patch.  I can do it the other way if preferred.
(a) I'm not super-happy about dotted import in general
(b) it didn't make any difference in this file to the overall number of diffs