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))`

I've tested this for a while with the usual German amount of umlauts and did not see any regression.

fixes #29