Add Membership Renewal as Scheduled Reminder trigger option
Currently Scheduled Reminders can be based off membership join, start and end date. Renewal date is an important workflow event, and should be supported.
The existing three dates for membership are stored on the membership record. Renewal date is not stored, and involves changing the end date.
civicrm_membership_log does not record what happened to prompt the new log record, ie a renewal.
A renewal can be (somewhat reliably) determined to have occurred at membership_log.modified_date when membership_log.end_date is increased by civicrm_membership_type.duration_unit * civicrm_membership_type.duration_interval compared to previous membership_log record for that membership. This can only be determined after the renewal has been processed.
Use a post-process validation to prevent configuration of a scheduled reminders based on a time BEFORE a renewal, only AFTER a renewal: "To schedule a reminder about an upcoming membership renewal, configure a message to be sent before the membership end date."
This algorithm will not work properly when the membership type duration and interval change between the time of the renewal and the sending of the reminder. As a work-around to avoid a schema change, when changes are made to the membership type duration or interval for a membership type that has a membership renewal triggered schedule reminder, display the following message: "Note: scheduled reminders for membership renewals of this membership type that have not been sent since the renewal will need to be done manually."