Add GIT_TIMEOUT variable to watch git operations

During my CI testing of each devstack change I can often see git get
itself stuck and hang indefinitely.  I'm not sure if it's transient
network issues, or issues at the remote end (seen with both github.com
and git.openstack.org) but it hits fairly frequently.  Retrying the
command usually gets it going again.  Searching for "git hanging" and
similar shows its not entirely uncommon...

This adds a watchdog timeout for remote git operations based on a new
environment variable GIT_TIMEOUT.  It will retry 3 times before giving
up.  The wrapper is applied to the main remote git calls.

Change-Id: I5b0114ca26b7ac2f25993264f761cba9ec8c09e1
Add variable to configure the run of IPv6 Tests

Related Tempest change:
  https://review.openstack.org/#/c/74933/

Closes-bug: 1282387

Change-Id: If9e9c5319c484dc4c00ed3bdcefc132410719b87
Add end-of-file checks to bash8

Add two end-of-file checks to bash8.  Firstly, alert if heredoc hasn't
finished.  Some heredocs were done like:

---
sudo bash -c "cat <<EOF > foo
...
EOF"
---

(A better way to do this is "cat <<EOF | sudo tee ..." as it retains
the usual heredoc layout in the code).

The trailing quote was throwing the matching in bash8 off and it kept
appending the next file as if it was still part of the heredoc.  To
avoid this, we check if we're still in a heredoc when we start a new
file; if so raise an error and reset the heredoc status fresh.  We
track the state of the previous file, line and lineno so we can give a
good error.

---
E012: heredoc did not end before EOF: 'cat <<EOF'
 - lib/trove: L221
---

This includes fixes for the existing problem heredocs.

A similar EOF check is to ensure the previous file ended with a
newline.

---
E004: file did not end with a newline: '$MY_XTRACE'
 - lib/neutron_plugins/embrane: L40
---

This requires only one fix

Change-Id: I5e547d87b3921fc7ce6588c28f074e5c9f489c1f
Run yum repolist commands as root

Otherwise you get yum errors like [1] when you run stack.sh as !root.
The solution is to run yum commands as root so it can access the right
certs

[1] https://access.redhat.com/site/solutions/312413

Change-Id: I54b0df13508c50aba67e23da11953c536933917a
Don't use --skip-redirect for cinder restart on rhel6

RHEL6 doesn't support this flag so the restart fails.  Not exactly
sure why it is required, seems unchagned from the initial
commit 67787e6b4c6f31388cbee6d83b67371b31c443d4

(found running stack.sh with -e per [1])

[1] https://review.openstack.org/#/c/71996/

Change-Id: Ib34c3663409d7b96b932286cb5a6974e940075d3
Merge "Don't use --skip-redirect for cinder restart on rhel6"
Merge "Run yum repolist commands as root"
Merge "Add GIT_TIMEOUT variable to watch git operations"
Merge "Add end-of-file checks to bash8"
Merge "Add variable to configure the run of IPv6 Tests"
Merge branch 'master' of github.com:openstack-dev/devstack