Add gate_hook for gate scripts

This is the initial effort to add a gate_hook
in solum, and move the exporting of KEEP_LOCALRC
into it from infra/config.

Also fixed a typo in pre_test_hook.

Closes bug 1334425

Change-Id: I9e37af1713e756217dc498d209d490016712c059
Merge "Add gate_hook for gate scripts"