device/trivial: add comment about lifetime of "kind" in tc_commit()

In general, all fields of public NMPlatform* structs must be
plain/simple. Meaning: copying the struct must be possible without
caring about cloning/duplicating memory.
In other words, if there are fields which lifetime is limited,
then these fields cannot be inside the public part NMPlatform*.

That is why

  - "NMPlatformLink.kind", "NMPlatformQdisc.kind", "NMPlatformTfilter.kind"
    are set by platform code to an interned string (g_intern_string())
    that has a static lifetime.

  - the "ingress_qos_map" field is inside the ref-counted struct NMPObjectLnkVlan
    and not NMPlatformLnkVlan. This field requires managing the lifetime
    of the array and NMPlatformLnkVlan cannot provide that.

See also for example NMPClass.cmd_obj_copy() which can deep-copy an object.
But this is only suitable for fields in NMPObject*. The purpose of this
rule is that you always can safely copy a NMPlatform* struct without
worrying about the ownership and lifetime of the fields (the field's
lifetime is unlimited).

This rule and managing of resource lifetime is the main reason for the
NMPlatform*/NMPObject* split. NMPlatform* structs simply have no mechanism
for copying/releasing fields, that is why the NMPObject* counterpart exists
(which is ref-counted and has a copy and destructor function).

This is violated in tc_commit() for the "kind" strings. The lifetime
of these strings is tied to the setting instance.

We cannot intern the strings (because these are arbitrary strings
and interned strings are leaked indefinitely). We also cannot g_strdup()
the strings, because NMPlatform* is not supposed to own strings.

So, just add comments that warn about this ugliness.

The more correct solution would be to move the "kind" fields inside
NMPObjectQdisc and NMPObjectTfilter, but that is a lot of extra effort.

(cherry picked from commit f2ae994b)
10 jobs for nm-1-18 in 29 minutes and 24 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #299898
allowed to fail
checkpatch

00:01:01

passed #299905
t_debian:9

00:13:22

passed #299907
t_debian:sid

00:14:42

manual #299906
allowed to fail manual
t_debian:testing
passed #299899
t_fedora:28

00:21:08

passed #299900
t_fedora:29

00:29:22

passed #299901
t_fedora:30

00:20:34

manual #299902
allowed to fail manual
t_fedora:rawhide
passed #299903
t_ubuntu:16.04

00:14:45

passed #299904
t_ubuntu:18.04

00:16:00