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.