Enforce function declaration format in bash8

Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
diff --git a/tools/build_pxe_env.sh b/tools/build_pxe_env.sh
index e6f98b4..50d91d0 100755
--- a/tools/build_pxe_env.sh
+++ b/tools/build_pxe_env.sh
@@ -17,7 +17,7 @@
 PROGDIR=`dirname $0`
 
 # Clean up any resources that may be in use
-cleanup() {
+function cleanup {
     set +o errexit
 
     # Mop up temporary files