Make id, on_msg, on_close attributes of Comm objects.