Implement TrackingFilter interface to filter out activities and events

Implement TrackingFilter interface to filter out tracking activities and
events. Consolidate filtering logic into a single class.