tun: Only free a netdev when all tun descriptors are closed