lib: Add event filter This currently supports matching events by: * name * source file:line * categories * key=value fields