Fix leak in logger

setThreadName can be called twice, obfuscating the previously allocated string

Fixes #12131

(cherry picked from commit b15009783583edc5c663d09ebb2a7baeeeab2c96)
In the playbackbox, allow jumping to an episode's display group.

Provides keybindings and a menu entry such that if you've highlighted
an episode in the All Programs view, you can see that episode
highlighted within its title's display group.  For example, you see
that a new episode has recorded, and you can quickly jump to the
episode's display group to see if there are any other episodes you
should catch up on first.

Thanks to Angela Schmid for the patch.

Fixes #12157

Signed-off-by: Jim Stichnoth <jstichnoth@mythtv.org>
(cherry picked from commit a375bccfa542c7d049e526dbc66fa67c35f2fbd3)
Fix an out of bounds read in the test harness when testing
DVBContentIdentifierDescriptor. The length value inside the
data block was longer than the data block itself, thus leading
to the DVBContentIdentifierDescriptor code reading off the
end of the array.

This is the cause of the occasional unit test failures on
some of the buildslaves, due to the test harness segfaulting.

Thanks to dekarl for the tweak to the data.

(cherry picked from commit 295d97e92331609a40a03c51ea3f3ddc6ba2cc89)
Fix crash when exiting LiveTV

This can occur mostly when liveTV is started using mythavtest. Should playback fail for some reasons and we exited: kaboom

(cherry picked from commit ec08df5292824c64f62eea6fcebb7c8d870c4715)
Fix search of image artwork in folder

The first character of the path was dropped, causing the search for images to always fail

(cherry picked from commit a6b3cfb6b1bb5e585e059723570591ca18446930)
Add search for “jpeg” type, and make search for image case insensitive.

Note: That entire code should be re-written
(cherry picked from commit 2d73bf8562dc5735a47fb17c84ff214871c2cba6)
Fix memory leak

introduced in 8e130d9b06ce8300c46dd80e014f7ae9829733ac

(cherry picked from commit 343cacb606f96a76392fbcb0a71c85e44f2585a8)
Add natural string comparison utility

e.g. Season 2 < Season 10

(cherry picked from commit 046ad2c5d046ead6fb676a537337a8d006365001)
Use natural sort for presenting content

Fixes #11796

(cherry picked from commit cb2561c41fa7378a16af0de1ccec1dcdb9edc56c)
Fix leak in display subtitle code.

172 bytes would be leaked after each new subtitles in DVD, and 160 bytes with other types of subtitles.

(cherry picked from commit f48a011d9a0ca692ba7846833ffd8a362cde7558)
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)
Bump ABI version