Fix null dereference

Coverity ID 1061551

(cherry picked from commit 9635bc42da3de7616d2ab248694ee9ae7ec2b42e)
Protect pbs with proper (aka locked) refcounting.

The PlaybackSock must not be immediatly deleted on connectionClosed()
if some other requests are still using it. This leads to segfaults in
the MBE when the SBE disconnects (#11306).
(cherry picked from commit 7b305848b0584bcebc55d6fe5a670ef7d2f55360)

Refs #11306
Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>

(cherry picked from commit 6f246c0d1567bd84e1d9d30de7def724fc75e8f6)
let mythtranscode --help hint at the optional cutlist
(cherry picked from commit 24be3436d75f5947ef6e7d444daee50666832ac6)
Make metadata title matching more permissive

From the ticket: Not sure why it was comparing the first char of both
strings, also think it shouldn't be case sensitive at all.

I think so, too

Fixes #11088
Patch by Daniel Ribeiro
(cherry picked from commit 18f6412f73cffc751931dc688d57ea3d7708c7f1)
make parameter names consistently lowercase

Since [3d9155909f] the parameter names used inconsistent upper and lower case.

There are two places in libmythupnp where the incoming packets are decoded, in
one place they are converted to lowercase, in the other place they are not.
This commit had made it lowercase in both places but did not change the code
that accessed the data, the caused serious discombobulation and the end of UPNP
watching through out the world.

Patch by Steve Beinicke

Fixes #12006
(cherry picked from commit e9a22c587713f2933402232b15daf82d4272dd2d)
let mythwikiscripts find the categories again when scraping script

But it still needs more TLC.
(cherry picked from commit 58ebc60632ebcdba90d15db8272cd03208d2e77e)
consider all aspect ratio changes when looking for the next change

When determining the dominant aspect ratio we must consider the next
mark of *any* aspect ratio instead of the next mark of the *same*
aspect ratio.

The last segment is ignored as of now.
(cherry picked from commit 6c1af4b12367fcf9de7d3bbae3282cfe63c18013)
consider the last segment when determining the aspect ratio

Use the very last mark of the recording (likely a key frame) instead
of the beginning of the segment when it is the last aspect ratio mark.
(cherry picked from commit 433b72111df8aec1e97145a8c1100537a523ab0f)
Always force program type to series if it has an onscreen episode number
(cherry picked from commit cda7494f7931ebfaacc328c66782e4536489e714)