apply json_clean to comm_msg content

The same code that is applied to other user-generated json content.

avoids errors in json encoding.
disallow nan in JSON serialization

since it's not actually valid JSON
Merge pull request #5810 from minrk/clean-comm-msg

apply json_clean to comm_msg content