Speed up ProgramInfo::SavePositionMap() database writes.

Use a single SQL query to save all new position map entries.
This speeds up SavePositionMap by an order of magnitude.

Fixes #12016

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit b4be8e24f9fab5b6a71f62df8e2c0403bedf4805)
Speed up writing EIT cache to database

Use a single SQL query to write EIT cache to database rather than a series of queries. This significantly speed up disk operations

Ref #12016

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit 850843df072efac23d19b27282c55cfce53f9b36)
Don't unecessarily query the backend if we don't need it

No point attempting to skip a commercial if there are none to skip.
This prevents querying the backend for an up to date frames count

Ref #12016

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit e2a5a966c2fae74469a5b33cb5937938af357471)