Fix performance/memory errors when editing recurring events
When we indeed need to find only a specific event occurrence, make the
recurrence loop return asap, instead of looping over all possible
occurrences in 100 years and returning all of them.