Fix MySQL database upgrade for channels without tuning details (#4247)

On systems where there are channels in the database that don't have any
tuning details, the SQL script failed to execute. This is due to the
column being declared NOT NULL, but the subquery not returning any
channel number for these rows. Because the database upgrade fails,
starting SetupTv and/or the TvService is impossible and the TvEngine is
unusable.

The script for SQL Server still needs to be fixed.
Fix MSSQL database upgrade for channels without tuning details (#4247)

This applies an alternate version of the parent commit to the MSSQL
script. Thanks to Guzzi for the fix.
Merge branch 'BUG-4247-Database-upgrade-61-fails-without-tuningdetails'
Merge remote-tracking branch 'refs/remotes/origin/master'
Merge branch 'refs/heads/master' into EXP-Windows-7-Half-Full-Screen