ProgramInfo::LoadFromProgram: Move the query 'fixups' out of FromProgramQuery

These fixups should ultimately be rethought or removed, they append
WHERE, GROUP BY or ORDER BY clauses to the end of the sql whether or
not it that's syntactically correct. More to the point however they
alter the query from what was requested by the caller in a
non-transparent way. A complete rethink of LoadFromProgram() is
probably required, where instead of passing in raw SQL there are more
arguments to the method to control it's output.

We don't want to use GROUP BY in combination with LIMIT or OFFSET as
this causes the query to take as long as it would without the
LIMITS. For the program table that can mean it takes 10 times longer
than it otherwise would. It's faster to filter out any duplicates when
iterating over the result set.
Services API: Remove useless GROUP BY clauses from GetProgramList and GetProgramGuide. This speeds them up, significantly in the case of GetProgramList.
Add the approximate query execution time to the database query logging.
Revert "Allow PiP when using a VAAPI playback profile"

The issue is in VAAPI decoder, so revert it for a better fix

This reverts commit 4a289572b54f076443f295cfae21f77e6d0f4d93.
Implement copying one VideoFrame into another where strides are different

copy(VideoFrame*, VideoFrame*) is buggy in that it simply copy the content of one frame into another, ignoring resolution and stride size.

For now, only handle copying a frame into another where the resolution is the same but the strides are different.
This is required for VAAPI Null video output as typically, the frame extracted doesn't have a stride equal to the width of the video, and instead is 32 bytes aligned.

Code could be optimised and SSE accelerated, to come
Fix VAAPI accelerated PiP

PiP wasn't possible with VAAPI playback. There was the issue that only one VAAPI context was allowed at a time, and then the frame retrieved couldn't be used as-is (fixed with 520b8bceb57235bba397fe7c15e12bc25f365ca5)

Drop VAAPI NV12 frame format support, the conversion to YV12 as it is is buggy and from a quick search/test, all VAAPI backends support either YV12 or YUV420P format, so there's no use for it anyway.
WebFrontend: Make the channel editor grid use all the available width
Show the 'Frontend Connected' messages when a known frontend reconnects.
Fix copy/paste error in [88a6a8d]
Use the system hostname in the temporary Time Zone check connection. There's no reason to use a false hostname here and it makes tracking client connections harder, especially if multiple slaves/frontends connect at the same time.
Ensure the CLIENT_CONNECTED/CLIENT_DISCONNECTED are sent only once for each frontend
Channel scanning: unbreak the cli.  Teardown() frees and NULLs
sigmonScanner, so testing it to be non-zero is always going to fail.
Further, if sigmonScanner is invalid, then transports will be empty, so that
is all the test we need.
Add ability to create video frames, where all lines will be X-bytes memory aligned.

This would create a frame, whose strides may not always match its width.
Disabled at present, as our rendering code doesn’t always properly display those (only Xv, Qt and VDPAU handle those properly). OpenGL being the most problematic.
For a YV12/YV420P frame to be properly aligned, a value of 64 needs to be used (so chroma planes are 16 bytes aligned).
Add NV12 format support to VideoFrame class, and fast NV12->YV12 format conversion

Include SSE optimised NV12->YV12 conversion routine.
SSE deinterleaver is 687% faster on my i7-2600 than the C version.

Add related unit tests and benchmarks
Add VAAPI vaDerive support, and re-add NV12 image format support

vaDerive provides a greater level of performance than vaGetImage, however there’s an added cost of having to convert NV12 into YV12 later which in practice negates the benefit.

Re-add NV12 support, but as least preferred format.
Fix strides size calculation for YV12/NV12 frames when the dimensions are odd.

Make sure to get the very last chroma component for each row.
Revert "Fix strides size calculation for YV12/NV12 frames when the dimensions are odd."

This reverts commit bab9fb8d1dbe7360b43407d0040ceffcba6d6e55.
Revert "Add VAAPI vaDerive support, and re-add NV12 image format support"

This reverts commit a1313671dd3d4be8325713fd97f07f2f0eec8418.
Revert "Add NV12 format support to VideoFrame class, and fast NV12->YV12 format conversion"

This reverts commit f75ae4b7d06d8c4d06b2676369664980156eb4e2.
Add NV12 format support to VideoFrame class, and fast NV12->YV12 format conversion

Include SSE optimised NV12->YV12 conversion routine.
SSE deinterleaver is 687% faster on my i7-2600 than the C version.

Add related unit tests and benchmarks