tests: fix running tests on installed copy of Portage.

This involved adding installation paths to configuration files
conditionally and letting repoman fetch metadata.dtd.
tests: fix running import & compile tests on installed copy.
travis: test installing & running tests against installed copy.