Add autocompletion in a message

The autocompletion is now processed even if the nick/query to complete
is not the first word of the message. So with these changes, it is now
possible to autocomplete "Hi Nab<tab>" into "Hi Nabellaleen".
Note : the algorithm take account of the possibility to have spaces in
nicknames, so, for a nickname like "My Nick", it is possible to
autocomplete "Hi My N<tab>" into "Hi My Nick".