Improved file buffering in CArchive.

CArchive already did some file buffering, but only on writes. Added the
equivalent code for reads. Also improved the write buffer case so that it
only ever issues sector-aligned writes (the read code does this from the
start). Shuffled various bits of code into the header file to squeeze a bit
more performance out of it.
[application] - remove m_bInBackground and its setter/getter and use
SetRenderGUI instead
[json] - fix jsonbuilder was not found when added to "PATH" from outside. Add the same approach like done in codegenerator.mk - fixes json generation when compiling from xcode
[airtunes] - phase out support for libshairport - its superseeded by libshairplay long enough on all platforms
Merge pull request #4694 from Memphiz/fixjsongeneration

[json] - fix jsonbuilder was not found when added to "PATH" from outside...
Correct null check

Correct likely copy and paste mistake, and null check the correct
variable.

Fixes Coverity CID 1213840
Merge pull request #4234 from bavison/carchive_buffering

Improved file buffering in CArchive.
Merge pull request #4697 from Memphiz/phaseoutshairport

[airtunes] - phase out support for libshairport - its superseeded by lib...
Merge pull request #4693 from Memphiz/remove_background

[application] - remove m_bInBackground and its setter/getter and use
[pvr] fix: wrong database table for column iLastWatched in CreateTable()
Merge pull request #4701 from cg110/CoverityFixes4

Fixes for the obvious bug from this weeks coverity scan.
[Confluence] Cosmetics - fixes #15180
Merge pull request #4707 from xhaggi/fix-remember-last-watched-group

[pvr] fix: wrong database table for column iLastWatched in CreateTable()
integrate optional component logging setting into core
[pydoc] fix document formatting
Merge pull request #4711 from Montellese/logging_components

integrate optional component logging setting into core
[airtunes] - remove the old advanced_settings flag "enableairtunesdebuglog"
and replace it with the new optional component logging setting
Merge pull request #4422 from Memphiz/airtuneslog

[airtunes] - move the old advanced_settings flag "enableairtunesdebuglog" to the xbmc.debug addon
upnp: add functionality to get Platinum log messages
platinum: add NPT_CONFIG_ENABLE_LOGGING to Makefile.in