Move serialization of `channel_state` fields to `channel_state.rs`