replace '%' style formatting with str.format()

- this commit should not change the behavior of the code in any way
- i've used the named syntax everywhere except when adding names would
  only have complicated the code without increasing readability, e.g.
  `'len {}'.format(len(msg))`

fixes mmb/weechat-otr#29