[AML] fixed, audio silence blips, make periodSize >= 1024 by forcing ALSA_PERIODS = 8

Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
[AML] fixed music playback, grAEken bites again
Apply rambuffer patch (pr1388)
PR 831 Inclusions (credit goes to bobo1on1 for original patch):

- Use Free Ram Percentage as Buffer Size
- Adjust Read Rate Based On Max Bitrate

Enhancements to PR 831:

- move variables over to advanced settings under <network> section ("freememorycachepercent" default 50% max 80% with hard limit of 1GB and 0 value will force filecache. It also removes "cachemembuffersize" variable as it is no longer needed)

- Memory buffer is straight percentage of free ram (i.e. if 50% free ram is used ~75% of the 50% will be forward looking buffer and ~25% of the 50% will be back buffer)

- Rate limiting which fixes SMB issues with PR 831 as far as I can tell (1.25 times max bitrate up to 40 MB/s in which case it is throttled to max bitrate)

- ios and linux fixes

Advanced Settings Notes: This PR adds a new setting under advanced settings and removes the "cachemembuffersize" setting as it is no longer needed. The added setting is as follows:

- "freememorycachepercent": The amount of free memory to use as buffer size.  Please note that of the percentage of free memory used ~75% will be used for forward buffering and ~25% will be used for the back buffer.  The default is 50% which is a good default for memory limted devices such as the atv2.  The max is 80 percent and there is a hard limit of 1GB buffer size irregardless of free ram.  Setting it to 0 will force filecaching (same as the way cachemembuffersize was used)
[AML] Force passthrough on all SoCs
[AESinkALSA] Buffersize changes
[AML] Allow mpeg2 HW accel on meson1/meson3
[AML] fixed, alsa/kernel lies, so map everything to 44100 or 48000

Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
[AML] Remap non-working sample rates for M6 or newer devices

M6 Sample rates:

//No Audio
- 5512 16/24
- 8000 16/24
- 11025 16/24
- 16000 16/24
- 22050 16/24
- 24000 16/24

//Working Audio
- 32000 16/24
- 44100 16/24
- 48000 16/24
- 64000 16/24
- 88200 16/24
- 96000 16/24
- 176400 16
- 192000 16/24
- 384000 16

//Popping/Crackling
- 176400 24
- 384000 24

Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
[AESinkFactory] Reduce buffer size check 256 > 128 (Credits to WJB@Github)
[XBMC] Backport: Bump ffmpeg to 2.3.2
Fix typo in commit a958f0fee0b1464dae19b0938589f491f685e830
Fix commit 25186ceea4ec41d1fdd1b9e7cb8d260e097a957a
[AML] Remove dependency on libamplayer and amffmpeg
[AML] Fill audio packets completely when resampling to prevent 'audio data unaligned' kernel warnings
[AML] Use fpsrate and fpsscale instead of rfpsrate and rfpsscale to detect framerate
[DVDPlayer] Fix incorrect frame rate detection of some videos with variable frame rate.

Use FFMPEG's r_frame_rate, if it as valid, as a video stream frame rate, otherwise use avg_frame_rate.
Also remove CDVDStreamInfo.rfpsscale, CDVDStreamInfo.rfpsrate, CDemuxStreamVideo.irFpsScale and CDemuxStreamVideo.irFpsRate,
they are not needed anymore.
[AMLCodec] Always use the SYNC_OUTSIDE decoder flag for most smooth playback of H264 video
[Settings] Save settings only if they were modified after last save

This prevents from multiple saving the same settings and helps to resolve
the issue on Amlogic G18REF TV-boxes when setiings may be lost after a poweroff.

On G18REF When you press the red button on the remote the system receives a signal that power
is about to off. XBMC always writes guisettings.xml before exit, and the same settings
may be written several times from different places in code. But the power gets turned off
before the system completes all shutdown procedures. There may be the case that guisettings.xml
is written half-way and couldn't be read upon next boot, so the XBMC creates a new one with
default settings.

With this fix the settings will be written at exit only once, minimizing the risk of being lost.
[AML] Add support for AV (CVBS) video output on Amlogic

Conflicts:
	xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
	xbmc/windowing/egl/EGLNativeTypeAmlogic.h
[EGLNativeTypeAmlogic] Enable true 1920x1080 output without upscaling on Amlogic-based devices.

Conflicts:
	xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
	xbmc/windowing/egl/EGLNativeTypeAmlogic.h