Add GFI self-test feature

This is a replacement for my previous pull request. This one has had a bit more testing, and it reworks the main menu code a little for improved readability and maintainability (easier to add menu items, since the #ifdef/#ifndef cases are immediately adjacent).