Consolidate boilerplate from embedded tests' main()
The main()
functions in test-dbus, test-bus, test-bus-system and test-bus-launch-helper are rather similar. If we consolidate them into one data-driven function, that makes it a lot more straightforward to break up test-dbus and test-bus into smaller test executables that are quicker to run.
This is most of the first few commits from !1 (merged), proposed separately here because it'll be significantly easier to fix #240 (closed) if we only have to fix it in one place.
It includes/requires !72 (merged).