refactor and fix tab completion

The following changes to Smuxi have been done in this branch:

# Move tab completion logic into _Frontend_ (common to all frontends).
# Fix irssi completion to cycle through matches if Tab is pressed repeatedly.

Comments are welcome!