Rework recording rule handling in services API.

Thanks to tafy/dev-team%40tikinou.com providing the initial patch and
testing the end result.

The existing AddRecordSchedule() and new UpdateRecordSchedule() calls
essentially take complete, fully-specified rules and sanity check them
before saving.  AddRecordSchedule() is used to add new rules and
UpdateRecordSchedule() is used to update existing rules.

GetRecordSchedule() is changed to conveniently provide rules suitable
for later calls to AddRecordSchedule() and UpdateRecordSchedule().
When given a valid RecordId, GetRecordSchedule() returns that rule.
When given a Template name, GetRecordSchedule() returns an empty rule
initialized with that template.  When given a ChanId and StartTime,
GetRecordSchedule() returns the rule for that program or a new one if
no rule currently exists.  If the MakeOverride parameter is true, the
returned rule for the program will converted to an override rule if
needed.

Clients should always call GetRecordSchedule() with the appropriate
parameters before modifying the rule and then calling
AddRecordSchedule() or UpdateRecordSchedule().  In this way, clients
do not need to know all of the details on how to initialize rules or
update them for specific programs.

Fixes #11495