Moves some integration testing code into common module for re-use.
integration tests: Removes unneeded import in test_build.
Adds another integration test, now for "link" step.

This also includes some re-organising existing test code to allow re-use.