websocket_demo: Re-work network interface stats acquisition

Previously we were looking through /proc/net/dev for the interface
defined in NET_IF

Make this more dynamic by using getifaddrs(3) to loop through the list
of configured interfaces and find one that isn't the loopback and that
is UP.

This means there's a good chance of this just working on most systems
without the need for any code changes first.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>