bug1010442 - Implement before query API for past events

https://bugzilla.mozilla.org/show_bug.cgi?id=1010442