Move code related to json packet reading to JsonPacketSender trait

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.