Allow specifying more than one TSD on the command line.

This adds a -L / --hosts-list flag that can be used to specify more than
one TSD, in which case tcollector will attempt to connect to any of them
and will keep cycling through the list until it manages to connect.

Patch with changes from Benoit Sigoure.
Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>

Change-Id: Ic6887a2b459c63709e60fe8e47c92efd550ea6fc
Add a constant for the default port used by TSD.

Change-Id: I8c8a00bb481b789c98402b0e827cc04b5d24fcf2
Fix shutdown of collectors with children.

Make each collector subprocess a group leader.  Signal whole group.
This fixes #46.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Put the name of the collector we're waiting on when shutting down.

Original idea of Jacek Masiulaniec.
Correctly handle empty object arrays.

This fixes #37.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Oops, fix leftover from debugging.
Add UDP counters from /proc/net/snmp.

Refactor stats printing code so that it's more generic and can handle
multiple stats files.  New metrics:
  - net.stat.udp.datagrams
  - net.stat.udp.errors

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Handle --max-bytes being passed without --backup-count.

In this case we want to force --backup-count=1 so that
we can setup logging properly and rotate the log file.

This fixes #59.