Avoid netlink socket address conflict

NetlinkManager previously bound all netlink sockets with nl_pid =
getpid(). Unfortunately only the first such socket is allowed to claim
nl_pid = getpid(). The kernel is happy to assign this value
automatically if nl_pid = 0. For more information on nl_pid see "man 7
netlink".

When NFLogListener was added, it created a socket with a kernel assigned
nl_pid, unfortunately the kernel assigns getpid() to the first such
socket and listener was initialized earlier in the startup process than
NetlinkManager.

This change alters NetlinkManager to request a kernel assigned nl_pid and
defensively moves the initialization of NFLogListener later in the
startup sequence to favor proper operation of existing code in
NetlinkManager. Error logging is also slightly improved.

Test: as follows
    - built
    - flashed
    - booted
    - "runtest -x .../netd_unit_test.cpp" passes
    - "cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t
       android.os.cts.StrictModeTest" passes
Bug: 62353125
(cherry picked from commit 519ffc3fbce7fa8113fa81d44ca313da6e6305ea)

Change-Id: Ia9599bd25c3c5fb751bfe24a530392b999169175
2 files changed