Move code related to json packet reading to JsonPacketSender trait

fixup! Move code related to json packet reading to JsonPacketSender trait
auto merge of #3955 : thiagopnts/servo/devtools-refactoring, r=jdm

I was messing around devtools code and saw some TODOs, is anyone working on it? I took one of them:

```// TODO: this really belongs in the protocol module.```

I would be glad to help with this if no one is on it already, just let me know.