A lot can happen between the detach starting and when we actually need to know if the vnet's shutting down, including lots of sleeping. Given that only the one spot needs to actually check if we're shutting down, get rid of the local.
While here, fix the ordering of vnet_sysuninit_shutdown so that it happens earlier in the shutdown process. Right now, it's at SI_SUB_VNET_DONE+SI_ORDER_FIRST which happens after vnet_if_return @ SI_SUB_VNET_DONE+SI_ORDER_ANY in SYSUNINIT-land, where the ordering is reversed. Put vnet_sysuninit_shutdown at SI_ORDER_ANY and drop ifnet return to SI_ORDER_MIDDLE.