Rename `option::foreach()` to `option::for_each()`

This prevents some false errors in QTCreator and is adapted to std
library style.
Add `str()` functions and `ostream` operators for `connect_message` types
Promote `message` from struct to class

And implement conversions to string.