ui: add non-tty report generation

Using stdout type (tty or file) as selection between "interactive"
and report generation.
main: added count argument to limit execution

Together with report this enables xping to run in non-interactive or
unattended fashion, from e.g. cron.

Number of probes are specified using "-c num" and when just before
sending the num+1 probe for the last target, the program stops.

This is similar to mtr's --report and --report-cycles.
ui: use termios to disable echo
bug: header dependencies

xping.h needs sys/socket.h for sockaddr - at least on FreeBSD.
bug: check-libevent needs LDFLAGS

Also allow looking for libevent in /usr/local/lib/event2 - default
location for FreeBSD port.