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.