Move devstack testr log copying to macros

So that as each job moves to testr, we don't have messy log stanzas
in the job definitions.

Change-Id: If7a2b5a635c2f41cf7445b6577a0c7bed072eb60
Set the Zuul/Jenkins base log URL in a function

And use that when constructing log paths and URLs.  Use a substr
of the change id or commit sha when constructing URLs so the log
directories are deeper.

Make copying the test results a macro (it's used in several places).

Update the gearman log client to take advantage of the new parameter.

Requires https://review.openstack.org/#/c/36304/

Change-Id: I64faa35eddc4105271efa3de4f83b608b77655c2
Merge "Move devstack testr log copying to macros"
Merge "Set the Zuul/Jenkins base log URL in a function"