Fixed text handling to allow nested text events.

Having the text accumulator at the decoder level was wrong, having it at the handler level makes it possible to support nested text nodes.