Have backend advertise which files are currently being written to

It is necessary in some playback scenarios to know if a file being read is currently being written to. This is useful in determining when encountering EOF if we should wait for more data or abort the read.

MythCoreContext will now keep track of files as they are being opened for writing
Connected frontends will receive the information via the event socket in the form of a BACKEND_MESSAGE event.

The myth protocol is extended with two new BACKEND_MESSAGE events:
FILE_WRITTEN: Sent when a file is opened in write mode, and when the file is being written to (at most every 10s)
FILE_CLOSED: Sent when the file opened in write mode is closed.

The myth protocol version doesn’t have to be increased as frontends will make use of it only if available and the changes are backward compatible with exiting myth protocol.
Prevent playback to exit early should backend's writes be delayed

Typical scenario is when watching on-going recordings and being very close to real time TV: should the backend take more than 360ms between two writes, the reader would treat it as an EOF and abort the read.

When encountering EOF, we now check if the file is being written to in parallel and if so wait.

We can also remove all EOF retries in FileRingBuffer::safe_read() as we definitely know now if we did reach EOF (as we check against the file size).
This allows for almost instantaneous program transition in live TV.
MusicMetadata::Filename(): return an invalid filename if the file is not found
MythMusic: improve the handling of unavailable tracks in the player

* add a MusicPlayerEvent::TrackUnavailableEvent which is sent when trying to
  playback a track that cannot be found.

* skip unavailable tracks and show a notification to let the user know we can't
  play the track.
MusicCommon: handle TrackUnavailableEvents from the music player

* This sets the font state to 'disabled' for the tracks item in the
  "currentplaylist" button list. (This should be a common font state used
   elsewhere in the Watch Recordings screen for example)

* Also sets the "playstate" displaystate of the item to "unavailable"

These changes should allow themers to mirror in the currentplaylist buttonlist
what appears for not available recordings on the  Watch Recording screen.
MythCenter-wide: Add the 'unavailable' state to the 'playstate' statetype

on MythMusic's currentplaylist button list.
default themes: Add the 'unavailable' state to the 'playstate' statetype

on MythMusic's currentplaylist button list.
MythCenter-wide: tweak the position of the 'unavailable' state
Allow tmdb3.py to use $MYTHCONFDIR as a cache location.

This makes tmdb3.py follow the standard behavior of using MYTHCONFDIR,
falling back to HOME, for its selection of scratch space. This also adds
explicit error reporting to stdout when something goes wrong.

Refs #11876
remove redundant check (silence cppcheck)

add comment to explain the magic number while here
comment out unused private fields (and their classes)

This was likely added in preparation of further development which
stalled and is now clogging up the compiler warnings.

Silences warnings on master-freebsd10-64bit.
extend IPTV recorder to handle MTPS input

By parsing VLC style program_number from the playlist the recorder
can select a specific program from the stream. The program_number
is also known as the service_id in DVB vocabulary.

Example playlist:

    #EXTM3U
    #EXTINF:0,1 - name of the program
    #EXTVLCOPT:program=61200
    http://192.168.1.100:8001/1:0:19:EF10:421:1:C00000:0:0:0:

Original patch by Torbjörn Jansson
Refs #11487
Rewrite qmake detection to better support Qt5
Resolve X11/Xlib.h define of Bool and Qt5 (5.2)

Xlib.h has a "#define Bool int", which causes compilation issues with other uses of
Bool, specifically in qsonvalue.h in Qt5.  This patch rearranges the MythTV source file
includes to bypass the issue.

Fixes #12065
Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>
Fix typo

CR got deleted for some reason
Rewrite qmake detection to better support Qt5 - plugins
notifications might only have an image without a 'message'.
Remove check_cxxflags line which doesn't exist
Fix mythnetvision.pro for Qt5
Enable compilation of a couple of files that were disabled on Qt5 because they are apparently not compatible. They build, so let them.