Return zero rather None for metrics without value
Return zero rather None for metrics without value

In case we don't get a value for a metric we pass an empty array to
calculate function which returns None. The None string isn't a valid value
for a metric and it also confuses systems that store metrics(Graphite, etc).

We now return 0 in this case.

Here is an example of a metric(downtime) without value
echo 'show stat -1 6 -1'|socat /run/haproxy/admin4.sock stdio|\
> awk -F',' '{print $1, $2, $25}'|grep backend2_proc34
backend2_proc34 bck2_proc34_srv1
backend2_proc34 bck2_proc34_srv2 493
backend2_proc34 bck_all_srv1
backend2_proc34 BACKEND 0

Output before commit:

% haproxytool server -D /run/haproxy -m downtime --backend=backend2_proc34|sort
backend2_proc34                bck2_proc34_srv1                           None
backend2_proc34                bck2_proc34_srv2                           493
backend2_proc34                bck_all_srv1                               None

Output after:

% haproxytool server -D /run/haproxy -m downtime --backend=backend2_proc34|sort
backend2_proc34                bck2_proc34_srv1                           0
backend2_proc34                bck2_proc34_srv2                           495
backend2_proc34                bck_all_srv1                               0

But for some metrics the value zero could be misleading, for instance the
throttle metric stores current throttle percentage for the server, when
slowstart is active and HAProxy returns no value if server is not in
slowstart mode.

unixsurfer/haproxyadmin,unixsurfer/haproxyadmin