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_ramdisk.sh b/tools/build_ramdisk.sh
index 7372555..50ba8ef 100755
--- a/tools/build_ramdisk.sh
+++ b/tools/build_ramdisk.sh
@@ -14,7 +14,7 @@
 fi
 
 # Clean up any resources that may be in use
-cleanup() {
+function cleanup {
     set +o errexit
 
     # Mop up temporary files
@@ -87,7 +87,7 @@
 # Finds and returns full device path for the next available NBD device.
 # Exits script if error connecting or none free.
 # map_nbd image
-function map_nbd() {
+function map_nbd {
     for i in `seq 0 15`; do
         if [ ! -e /sys/block/nbd$i/pid ]; then
             NBD=/dev/nbd$i