simplify filter handling of events and new_events

this removes unecessary duplication when treating the original event as
a special case (different from new_events generated by a filter).
Also, since @filter_func only outputs non-cancelled events, some checks
were also removed.
append events generated by a filter using unshift instead of insert
Merge pull request #1628 from jsvd/simplify_filter_handling

simplify filter handling of events and new_events