Conversations rewrite #2

this is the continuation of my work in #4558

Ignore the first commit, that's still the sinatra-related stuff. I will history-edit the branch once I'm done...