Abstract commonality from the two comma modes.
Abstract commonality from the two comma modes.

The previous commit introduced a mode where trailing commas cause a
parsing failure, thus giving two runtime modes to the JSON parser in
this respect. This change abstracts out common aspects of those two
modes to avoid code duplication.

google/serde_json_lenient