HPCC-11389 Ignore loopback interfaces when selecting the interface to use

Use the IFF_LOOPBACK flag as well as detecting loopback ip.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #5844 from richardkchapman/ignore-loopback

HPCC-11389 Ignore loopback interfaces when selecting the interface to use

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>