new branch to fix event_occurences bug. Pivotal #:76544670

new branch to fix event_occurences bug.
Pivotal #:76544670, https://www.pivotaltracker.com/n/projects/982890/stories/76544670
repeating event schedule is not respecting end time limit (event.repeat_ends_on)
Fixes repeating event repeat_ends_on bug by modifying the next_occurrences function to only accept scheduled event instances before that datetime.
I would prefer leaving the comments in for this function because I think that this little function is confusing without them, as evidenced by the bug that was in this code.  I get the sense that some members of the Ruby/Rails community (e,g. Armando) frown upon comments, but I'm more in the old school camp (e.g. David P.)