Approved by: re (hrs, marius)

MFC 253346:

    PR: 168520 170096
    Submitted by: adrian, zec

    Fix multiple kernel panics when VIMAGE is enabled in the kernel.
    These fixes are based on patches submitted by Adrian Chadd and Marko Zec.

    (1)  Set curthread->td_vnet to vnet0 in device_probe_and_attach() just before calling
     device_attach().  This fixes multiple VIMAGE related kernel panics
     when trying to attach Bluetooth or USB Ethernet devices because
     curthread->td_vnet is NULL.

    (2)  Set curthread->td_vnet in if_detach().  This fixes kernel panics when detaching networking
         interfaces, especially USB Ethernet devices.

    (3)  Use VNET_DOMAIN_SET() in ng_btsocket.c

    (4)  In ng_unref_node() set curthread->td_vnet.  This fixes kernel panics
         when detaching Netgraph nodes.
Merge remote-tracking branch 'upstream-github/stable/9' into stable/9