Revert "Fix transitionis from full screen to windowed screen"

This reverts commit 3458cc3bbd1af3340c1da3a5fb32f48e07e36c9e.
Revert "Fix fullscreen windowing with Compiz/Unity"

This reverts commit 88ab998e5897cb0612ae7dd02353684701240136.
Fix fullscreen windowing with Compiz/Unity

Also fixes live transitions from full screen to windowed screen.

Tested on the following systems:
* Linux Ubuntu 12.04 and 14.04, with box Xfce and Unity, with multi and single screens setup (including TwinView). AMD, nVidia and intel drivers.
* MacOS 10.9: multi and single screens setup

Fixes #9589
Fixes #8021
Fixes #7958
Trigger system events when devices connect and disconnect to AirPlay and AirTunes

Fixes #11182
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
Do not immediately save volume to DB when changing volume

Instead need to call SaveCurrentVolume()
Save volume only on TV Player exit

Original patch by angelaschmid <angela.schmid@wolke7.net>. Thank you

Fixes #12144
Force refresh of xf86VidMode current modeline

After changing the mode with XRRSetScreenConfigAndRate, the modeline returned
by XF86VidModeGetModeLine is wrong until XRRGetScreenInfo is called (at
least for X.Org 1.14.5 and 1.15.0 with Intel video driver).

DisplayResX::SwitchToVideo first calls XRRGetScreenInfo, then calls
XRRSetScreenConfigAndRate. This leads to XF86VidModeGetModeLine always
returning the previous modeline instead of the current one.

This was causing juddering in some cases, because the refreshrate used
in MythPlayer for initializing avsync_predictor is obtained from
XF86VidModeGetModeLine.

For example the following scenario was causing me consistent juddering
every second:

The display has modelines for 24 Hz, 50 Hz and 60 Hz modes, and the desktop
mode is 60 Hz.
I first play a 23.976 fps video. The display switches to 24 Hz mode, but the
refreshrate used by avsync_predictor is set to 60. This does not cause
noticeable judderng. Then, I play a 25 fps video. The display switches to
50 Hz mode, and the refreshrate is set to 24 (the previous one). Every second
the avsync_predictor kicks in and drops some frames.

This patch fixes this issue by calling XRRGetScreenInfo after the mode is
changed by XRRSetScreenConfigAndRate.

Fixes #12150
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
Tidy up the playlist code a little, in particular don't reimplement functionality that QList has built in.
Fix logic error in HttpWorker::run() spotted by Jonatan Lindblad. Fixes settings pages in backend webserver.
Fix NUV playback

dbb38743501ac4dd361b248fcaa337d00a85329c introduced the regression.
Change VideoFrame default value

dbb38743501ac4dd361b248fcaa337d00a85329c introduced a new behavior which is properly handled only in two places now, there are still other areas using VideoFrame.
Change default VideoFrame values so it uses the original behaviour for those instances
Revert "Fix NUV playback"

This is not required with 315b354ac, and I'm afraid it could introduce regression.
Better safe than sorry

This reverts commit ba0fc4e29d9d27edc6ad25d16cdf7b799c66548f.
Wait shortly for QApplication to register the screen change before continuing.

When there’s a screen resolution change, QApplication::desktop() will continue to report the old resolutions causing incorrect sizing at startup by MythMainWindow and MythUIHelper.

Now, create a QEventLoop that will process the required events during a short period of time.
Revert "Wait shortly for QApplication to register the screen change before continuing."

This reverts commit beca4bb5c7b3662020aec640de060f949dc220e1.
Wait shortly for QApplication to register the screen change before continuing.

When there’s a screen resolution change, QApplication::desktop() will continue to report the old resolution causing incorrect sizing at startup.

Now, create a QEventLoop that will process the required events during a short period of time.
Webfrontend: Update Galleria plugin to the latest version, hopefully fixes it continuing to run in the background even after we've browsed away from the overview page.
WebFrontend: Add support to sort the Recording Rules list by the when they will next be recorded.
Add natural string comparison utility

e.g. Season 2 < Season 10
Use natural sort for presenting content

Fixes #11796
Fix build on big endian system

Fixes #11136