Allow chaining of triggers

Triggers can return a string from its handler functions. The returned string
will replace the original message and go through the chain of handlers again
with the new text. This allows for chaining triggers.

Also, this avoids infinite loops of bots talking to themselves: previously
a bot would also try to handle its own messages, which in some situations
could cause infinite loops.