Fixes repeating event repeat_ends_on bug by modifying the next_occurrences function to only accept scheduled event instances before that datetime.

Pivotal #: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.
in here, the `not_to eq` tests are pointless, because in the previous line, we tested that it must `eq` something, so it could not possibly be anything else at this point