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_uec_ramdisk.sh b/tools/build_uec_ramdisk.sh
index 3ab5daf..5f3acc5 100755
--- a/tools/build_uec_ramdisk.sh
+++ b/tools/build_uec_ramdisk.sh
@@ -20,7 +20,7 @@
 fi
 
 # Clean up resources that may be in use
-cleanup() {
+function cleanup {
     set +o errexit
 
     if [ -n "$MNT_DIR" ]; then