Silence some cppcheck warnings about const variables not passed by reference.
Patch to check for fcntl success

Static analysis (coverity) detected that the
system call fcntl did not check its return
value.  This patch adds in that check.

This patch also implements a more robust setting
of the fd flags (get the current flags, or'ing in
the NONBLOCK value, and then setting the flags).

Fixes coverity 1028691
Fixes #11610
strip trailing whitespace
Services: Improve channel ordering sql. This works much better with seperators like _ and . used by some, especially in the US.
Revert "Speed up and reduce temporary space of time search a lot."

There is a simpler alternate fix that doesn't affect sorting as this
one does.

This reverts commit c0c47344879d3467cfea62938a33e70278252b36.
Drop DISTINCT clause from program query, it's not required and slows down queries significantly.
Some builds of mysql don't accept INT as a castable type, use UNSIGNED instead.
cppcheck: call by reference, efficient emptyness check

remove unused prototype while here
allocate buffer for PESPacket with pes_alloc (coverity 1047220)
Explicit casts for C++11 standards compliance

Fixes #11845
Exclude hidden channels from GetProgramGuide/LoadFromProgram
WebFrontend: added ability to close recordings box with escape
Webfrontend: Fix recordings list paging. An 'optimisation' in 66fbffa2 broke the TotalAvailable count so I've reverted it.
disable Jack if its to old (Ubuntu 10.04 LTS)

After 59b4b6c967d28fc803be1248fe3d509a00ad9c2f the build was broken at
least on older versions of Ubuntu. Now we just disable Jack output if
Jack is to old instead of completely failing to build.

Found and tested by Jim Stichnoth
Be less aggressive about clearing the bookmark on exit.

Refs #7994.  We shouldn't automatically clear the bookmark at the end
of the recording if the "Clear bookmark on playback" setting is false.
Fix SOAP Requests - broken since parameters were made case insensitve.
pass const QString by reference (via cppcheck)
pass const QDateTime by reference (via cppcheck)
pass const QDateTime by reference (via cppcheck)
check efficiently for emptiness (via cppcheck)