Currently, and even historically (as I've recently determined), if_free can return without the interface having actually been freed. If we're in the middle of an if_ioctl handler, for instance, destruction is deferred until the ioctl handling is complete.
This adds a post-free handler, if_freed, that takes the softc associated with the ifnet and invokes it after the ifnet's actually gone away. Drivers can then use it to safely cleanup softc state rather than ad-hoc hacks to workaround the potential race between ioctl/destroy.
The tuntap(4) conversion to this model has been added to this diff as an example, but I can spot similar changes being needed in bridge/gif/vxlan at a minimum.
I'd like to move the callback to the end and burn an ispare for MFC to at least stable/12 and maybe stable/11, as I'm sure there are other places the current situation can bite us and it'd be a good idea to clean it up.