Rename commands.c functions
Use macros for declare/implement of commands
Minor style nits
Prevent access on a 0-length string
Guard against invalid variables
Move public API functions higher in the file

They're easy to miss after all the variable functions.
Add send_event to command table
Clean up commands API and functions
Rename confusing function
Fix commands API usage
Move append_escaped to events.c
Various nits in commands.*
Various nits in cookie-jar.*
Various nits and cleanups in events.*
Rework events on command execution

The new behavior removes the only uses of two public event functions and
is also sets last_result before sending the event.
Various cleanups in gui.*
Nits in config.h
Various nits and cleanups in inspector.*
Various nits in io.*
Various nits in menu.*