[cmyth] Fix memory leak in cmyth_livetv_chain_add_url

This fixes memory leak in cmyth_livetv_chain_add_url in case ref_realloc
fails.
[cmyth] Fix assign instead of copy error in cmyth_rcv_timestamp
[cmyth] Store cmyth_send_msg return code in r instead of err

This prevents this lines from being detected as copy/paste errors.
[cmyth] Fix uninitialized access in cmyth_mysql_keep_livetv_recording

This fixes accessing uninitialized autoexpire value in case we fail to
read the AutoExpireDefault value from the database.
[cmyth] Fix memory leak in recordingrule

The fields subtitle and callsign were not freed when a recordingrule is
destroyed.
[cmyth] Fix memory leak in recordingrule timestamps

The fields starttime and endtime are initialized by copy in
cmyth_mysql_get_recordingrules. Therefore it's not necessary to allocate
memory in cmyth_recordingrule_create.

The existing code leaks memory when overriding starttime and endtime
in mythtv_mysql.c with cmyth_timestamp_from_unixtime.
[cmyth] Add fblen parameter for cmyth_rcv_feedback

The function cmyth_rcv_feedback was incorrectly using sizeof for
retrieving the string length of a character pointer.

The patch improves this by adding a fblen parameter and requiring the
caller to explicitly specify the length of the feedback that the
function should check.
[cmyth] Don't read after free in ref_release

A refcount of <0 indicates an error and prints the ref.
In case we freed ref, we must not enter this path.
[cmyth] Replace non-portable sizeof in cmyth_proglist_sort
[mythtv-cmyth] Pass PVR_TIMER as const ref in PVRtoMythRecordingRule

Avoid copying struct PVR_TIMER since its size is around 3000 bytes.
[mythtv-cmyth] Don't deref non found recRule in GetTimers

In addition, use std::distance to find the iterator index.