Make Frontend/Backend connection works when BE is set to use IPv6 link-local address

BackendServerIP6 has created by mythtv-setup will contain the scope Id. That scope id is only valid on the machine mythtv-setup was run on.
We must remove that scope id before attempting to use it, as otherwise the connection would fail.

IPv6 link-local addresses do cause a problem has all network interfaces have one. We attempt to determine the scope id by trying to connect to the backend using each active interfaces. Once the scope Id is found, we cache it for later use.

This fixes #10921

(cherry picked from commit 5594a6f32e73b0519b556b63983786a01a0f2228)
Fix connection to Master Backend where the master IP address is an IPv6 address

Similar problems as fixed in 5594a6f32e73b0519b556b63983786a01a0f2228, if MasterServerIP is an IPv6 address or contains a scope Id, it will prevent frontend and slave backend to connect.

Several fixes:
* the master backend detects that it is the master by comparing its IP address with the value stored in the MasterServerIP setting. The comparison is made using strings.
So if MasterServerIP is set to something like 192.168.000.001 it will fail (as we would be comparing with 192.168.0.1). IPv6 can also contains upper or lower case characters.
* In some cases, like gCoreContext control server socket, or connection between slave backends and master backend  would only ever used the IPv4 address. Use IPV6 if available

Add convenience methods:
    QString GetBackendServerIP4(void);
    QString GetBackendServerIP4(const QString &host);
    QString GetBackendServerIP6(void);
    QString GetBackendServerIP6(const QString &host);
    QString GetMasterServerIP(void);
    int GetMasterServerPort(void);
    int GetMasterServerStatusPort(void);
    int GetBackendServerPort(void);
    int GetBackendServerPort(const QString &host);
    int GetBackendStatusPort(void);
    int GetBackendStatusPort(const QString &host);

And use them thorough the code, they will ensure the value read is always correct and usable

Ref #10921

(cherry picked from commit 520ea17ef86e5b85006d58d95a777d0b15056045)

Conflicts:
	mythtv/programs/mythbackend/mainserver.cpp
Don’t add port number to myth URL if it’s the default port, makes for cleaner URLs

Also put IPv6 URL in lower-case, I find it prettier

(cherry picked from commit 890a9867b54dd3d1543c79c150fa9fcbbe997adf)
Fix GetBackendServerIP6 from returning IPv4 address

(cherry picked from commit f93822a8cadc7e0687ee97a207a16525776467fd)
Allow MasterServerIP, BackendServerIP and BackendServerIP6 to be a hostname

This became a requirement following 5594a6f32e73b0519b556b63983786a01a0f2228.
It was assumed in that commit that MasterServerIP was always an IP address as it’s the only thing mythtv-setup will allow.
However, pre-0.25 it was possible to set a hostname. Breaking grand-fathered network configuration

Add MythCoreContext::resolveSettingAddress and resolveAddress utility method to resolve hostnames

(cherry picked from commit d56fef8807fea73357d0d4e29e9856c7770e6b15)
Allow IPv6 use in backend service

(cherry picked from commit 574b2d376d69d2fcd1245fbe2ba40fe02ce08c80)
Have server pool and mythbackend use new MythCoreContext::resolveSettingAddress API

this allows to set a hostname in the mythtv-setup BackendServerIP/6 settings

(cherry picked from commit 0e119c9a5e8f088d88e4a58646865c8ed5a4de7d)
Tidy-up code.

C++y casts

(cherry picked from commit 0b64f62773aeaa58b1be37c5751c6e5275afdcca)
Make MythCoreContext::GetMasterServerIP returns localhost when none are defined

(cherry picked from commit c0223f9ffa35b4d16768e96aa989b7f1998b5610)