[PATCH v2] efi_loader: move efi_var_collect to common functions