[efi] Add excessive sanity checks into efi_debug functions

Try very hard to avoid ever doing something invalid while attempting
to generate a debug message.

Debugged-by: Curtis Larsen <larsen@dixie.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Merge remote-tracking branch 'upstream/master'