Tweak gate hooks scripts to handle both functional and api jobs
With this change both the API and Functional job will benefit
from the use of gate hooks. This is especially useful to make
the API job emit the test results the same way other jobs do.
NOTE: Changes are applied to both contrib directories under
neutron/tests and neutron/tests/functional; these two directories
are supposed to be in sync until change [1] merges, after which
we can drop neutron/tests/functional/contrib, in favor of
neutron/tests/contrib. This was done because of the symlink issue
caused by [2].