Fix a number of mis-uses of AVPacket in mythtranscode

Fixes some leaks, memory issues and segfaults.

We still mis-use AVPacket, but this at least lets lossless transcodes
with cut lists run to completion. Better fixes may come later when we
have more time to work on them.

Fixes #12280
Treat the failure to create the database object as a fatal error.
More lossless mythtranscode fixes

Lossless (mpeg2) transcodes in master now seem to work perfectly on every file
I've tried included files which have always failed to
transcode. Feedback to the forum, irc, mythtv-dev or mythtv-users list
would be appreciated. I'd like to know whether this resolves long
standing lossless mpeg2 transcoding failures for anyone else. I make no
promise to fix unresolved issues, but it would be good to know if
things have moved in the right direction.

Fixes #12280
disable metadata unit test for now
use type and verify it against Type()

silence a compiler warning
UPnP: Fix silly mistake picked up by cppcheck
silence cppcheck by not updating state after the last pixel
initialize all members in the constructor

Though I wonder if setting m_run(true) isn't a bit early, when we
could set it in Run().
DataDirectProcessor: Add logging when file opens fail

Fixes #12251.

Signed-off-by: Paul Harrison <pharrison@mythtv.org>
DataDirectProcessor: Use random temporary filenames for downloads

Fixes #12253.

Signed-off-by: Paul Harrison <pharrison@mythtv.org>
reorder initialization to silence the compiler, too
call the superclass method exit explicitly to silence cppcheck
avoid going uint_8 -> unsigned int -> uint8_t

silence compiler warnings about going narrowing conversion
YUV offsets are int only in VideoFrame

silence warning about narrowing conversing when ptrdiff_t != int
don't zero the pointer after the delete if its a parameter

silence cppcheck in this case
    void a (type *b) {
        delete b;
        b = NULL; // Assignment of function parameter has no effect outside the function.
    }
themechooser:  Load all the valid themes for the current version of myth,
including any tagged versions.  In other words, if the current versioin of
Myth is 0.27.3, then looks for themes for 0.27.3, 0.27.2, 0.27.1 and 0.27
UPnP: Prevent infinite recursion when season is zero.
UPnP: Improve object/container ID creation.

Also fix some issues when Browse() mode is set to Metadata.
Add additional indexes to the music tables.

One index on song_id in music_albumart.
One index on artist_id in music_albums.

Speeds up browsing music and loading of the UPnP tree.
UPnP: Fix startingIndex for Search() requests. We don't actually support searching yet, but spotted this while looking at another issue.