Add functional tests for copy_configuration.

This creates a module for functional tests and refactors the suite into
multiple re-usable components.