Redmine#4168: sys.ports_listening and sys.netstat_ports

see https://cfengine.com/dev/issues/4168

Introduces `sys.netstat_ports`, a data container with information about all the listening ports (including type, local and remote address, and local and remote port), and `sys.port_listening`, a slist of local listening ports.

Factors out the nastiness of `netstat -an` processing and uses callbacks to preserve the old behavior in cf-monitord.

Example usage:
```
body common control { bundlesequence => { run }; }

bundle agent run
{
  vars:
      "ports" string => format("%S", "sys.netstat_ports");
      "lports_sort" slist => sort("sys.ports_listening", "int");
      "lports" string => format("%S", "lports_sort");

  reports:
      "ports: $(ports)";
      "listening ports: $(lports)";
}
```

Output (wrapped a big):

```
R: ports: [{"local":{"address":"127.0.0.1","port":"631"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"17500"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"57983"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:57983           0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"24800"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:24800           0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"2222"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:2222            0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"8080"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     "},
{"local":{"address":"127.0.1.1","port":"53"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     "},
{"local":{"address":"0.0.0.0","port":"22"},"remote":{"address":"0.0.0.0","port":""},"type":"tcp","line":"tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     "},{"local":{"address":"::1","port":"631"},"remote":{"address":"::","port":""},"type":"tcp6","line":"tcp6       0      0 ::1:631                 :::*                    LISTEN     "},
{"local":{"address":"::","port":"57983"},"remote":{"address":"::","port":""},"type":"tcp6","line":"tcp6       0      0 :::57983                :::*                    LISTEN     "},
{"local":{"address":"::","port":"22"},"remote":{"address":"::","port":""},"type":"tcp6","line":"tcp6       0      0 :::22                   :::*                    LISTEN     "}]

R: listening ports: { "22", "53", "631", "2222", "8080", "17500", "24800", "57983" }
```