Improve /topic completion.

Currently, /topic completion sometimes does not work as intended, so
this patch introduces completion of a topic by the beginning of text. So
if a channel has topic `example` then command `/topic ex<tab>` is
replaced with the full topic, but the input `/topic ot<tab>` is not
completed for sure.