context analysis: use clause processor

This creates a new clause_processor interface, which allows an
object to manipulate a clause (list of text events).

This also makes context analysis support the clause_processor
interface, while still supporting the text_reader interface. This
is to aid the transition to the new interface.