Don't process history entries outside date range

The following queries cut the number of queries in half for a busy week:

- Remove skip() method from events class since history api does the filtering.
- When processing history events for an issue, only process ones within desired
time range.

Before:
- Total queries executed: 1232
- Unique queries executed: 1231
- Total query execution time: 0.7097 seconds

After:
- Total queries executed: 574
- Unique queries executed: 573
- Total query execution time: 0.2581 seconds

Issue #17966
There is a database index idx_bug_history_date_modified.
Did you also try to reduce the data by using WHERE date_modified > $p_start_time AND date_modified < $p_end_time ?
This should be faster than fetching the data and filtering it afterwards.