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>
Merge branch 'candidate-4.2.6' into candidate-5.0.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>