Support filtering events represented as dicts.
Support filtering events represented as dicts.

This is useful because the emphemeral events such as presence and
typing are represented as dicts inside synapse.

matrix-org/synapse,iot-factory/synapse,TribeMedia/synapse,matrix-org/synapse,iot-factory/synapse,TribeMedia/synapse,matrix-org/synapse,TribeMedia/synapse,iot-factory/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,iot-factory/synapse,TribeMedia/synapse,iot-factory/synapse