[cmyth] Use findday when adding or updating recording rules

MythTV sets 'findday' to  {0 = Saturday, 1 = Sunday, …, 6 = Friday}.

Values have to be computed using ODBC standard:
(1 = Sunday, 2 = Monday, …, 7 = Saturday) modulo 7.
[mythtv-cmyth] Add Filter and SetFilter to MythRecordingRule
[cmyth] Fix may be used uninitialized warning in cmyth_rcv_commbreaklist

commbreak.c: In function 'cmyth_rcv_commbreaklist':
commbreak.c:247:23: warning: 'start_type' may be used uninitialized in
this function [-Wmaybe-uninitialized]
commbreak.c:250:27: warning: 'start_mark' may be used uninitialized in
this function [-Wmaybe-uninitialized]
[cmyth] Fixed unused variable warnings in mythtv_mysql.c

mythtv_mysql.c: In function 'cmyth_mysql_get_prev_recorded':
mythtv_mysql.c:332:6: warning: unused variable 'n' [-Wunused-variable]

mythtv_mysql.c: In function 'cmyth_mysql_get_guide':
mythtv_mysql.c:413:6: warning: unused variable 'n' [-Wunused-variable]

mythtv_mysql.c: In function 'cmyth_mysql_get_prog_finder_char_title':
mythtv_mysql.c:523:6: warning: unused variable 'n' [-Wunused-variable]
[cmyth] Fix differ in signedness warning when using __cmyth_rcv_data

event.c: In function 'cmyth_event_get_message':
event.c:245:3: warning: pointer targets in passing argument 3 of
'__cmyth_rcv_data' differ in signedness [-Wpointer-sign]
In file included from event.c:24:0:
./cmyth_local.h:311:12: note: expected 'unsigned char *' but argument is
of type 'char *'

socket.c: In function '__cmyth_rcv_okay':
socket.c:654:4: warning: pointer targets in passing argument 3 of
'__cmyth_rcv_data' differ in signedness [-Wpointer-sign]

In file included from socket.c:30:0:
./cmyth_local.h:311:12: note: expected 'unsigned char *' but argument is
of type 'char *'
[mythtv-cmyth] Cosmetics in tools.h
[mythtv-cmyth] Fix calculation of daytime in tools.h
[mythtv-cmyth] Refactoring schedule management

New class MythScheduleManager handles recording operations.
All related code has been refactored.

Some rules depend on the backend version. Those are handled by a version
handler, that can be extended, when a new version should be supported.

In the future main services like 'Schedule recording', 'Delete Recording'
could be transfered to the version helper as needed.
[mythtv-cmyth] Add MythConnection::GenerateRecordingPreview

This function triggers the backend to generate a preview for the given
recording.
[mythtv-cmyth] Assign RecordingStartTime to PVR_RECORDING.recordingTime

PVR seems to identify recording with key {title,recordingTime}. Using start time of EPG program make confusion between recordings of the same EPG. Assign RecordingStartTime to recordingTime instead.
[mythtv-cmyth] Keeping live recordings doesn't update recording list

This case occurs when keeping a live recording and stopping to watch it:
MythTV creates a new rule (recordid) for the recording, which is part
of our UID. So replace the old live recording without rule (recordid=0) with
this one.
[mythtv-cmyth] Add MythProgramInfo::IsLiveTV
[cmyth] Add cmyth_recorder_set_live_recording

Recording live TV show to keep it
[mythtv-cmyth] Add MythDatabase::KeepLiveTVRecording

The function triggers the backend to disables/enables auto expiration and sets
the storage group to 'Default'/'LiveTV' to keep/release a Live TV recording.
[mythtv-cmyth] Enabling 'Keep LiveTV Recording'

Live timer doesn't create a recording rule anymore. Now we set recorder and keep
recording. Backend will create rule as needed for us and no more recorder used.

Add menuhook 'Keep LiveTV recording'. The improvement is extended to keep old
live recordings using menuhook in recording screen.
[mythtv-cmyth] Use IsTunable instead of CheckChannel when switching channels
[mythtv-cmyth] Revert SwitchChannel improvement and reopen live streams again

The free input list is always empty when the recorder is locked or paused and
we reopen the live stream anyway.

Also CheckChannel fails in some cases and can break the recorder and the
recording.
[mythtv-cmyth] Don't store the file control connection in file.c

There is no need to store the file control connection since it is ref counted
in cmyth_file_create. If needed it can be accessed using cmyth_file_control.
[cmyth] Add support functions for UTC timestamps

In MythTV protocol 0.26 all commands return time values in ISO8601 format
(including a zone flag 'Z'). This patch adds support functions to process those.

The conversion from UTC timestamp to 'time_t' has been banned.
Once a timestamp created as UTC time, it can be formatted to string or others
for processing only.

Add new attribute 'timestamp_isutc' to indicate if a timestamp is in UTC time.
UTC timestamp can be create in two ways:
- by function cmyth_timestamp_utc_from_unixtime
- by function cmyth_timestamp_from_string
  Here if the string is formatted using standard ISO8601 (including 'Z')

Update 'to_string' and 'to_display' functions to consider timestamp_isutc.
Prohibit conversion in all functions using 'mktime' by returning NULL
of (time_t) -1.
Add new function 'cmyth_timestamp_to_utc' to convert local timestamp to
UTC timestamp.
Add new function 'cmyth_timestamp_isutc' to retreive the zone type of
timestamp: 1 = UTC, 0 = local
[cmyth] Cosmetics in timestamp.c

- Function cmyth_timestamp_from_tm() is locali. Set storage type to static.
- Function cmyth_timstamp_diff() should return number of seconds.
  Use difftime() from standard lib.