[PATCH v2 09/12] efi_loader: split unrelated code from efi_bootmgr.c