Setting an nvstore variable also sets it in the loader's environment,
both when we store it and when we import the nvstore at startup. We
did that with EV_NOHOOK, which is right for our own variables, since
their hook is what stores them. A variable that something else in the
loader created, e.g., currdev or console, has hooks of its own that
validate it or act on it. We bypassed those, so a stored value never
really took effect, and we could set or discard a variable whose hooks
would have refused.
Refuse to set or unset such a variable with EPERM before we touch the
pool label, and skip it when we import the nvstore.
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.