Currently, when an object is mapped with `subobjects: false`, trying to ingest a document that has nested objects leads to a mapping exception.

In a couple of occasions, we've been talking about that it would be convenient if Elasticsearch could automatically flatten the fields instead of the client having to know about the `subobjects` setting. This would make `subobjects: false` more of a drop-in replacement that allows for a much easier adoption, without changes in the client.

Note that the `_source` should ideally stay untouched, just the stored fields should be flattened automatically.

Some related issues
* https://github.com/elastic/apm/issues/347
* https://github.com/elastic/elasticsearch/issues/88777
* https://github.com/elastic/package-spec/issues/349
libs/x-content/src/main/java/org/elasticsearch/xcontent/XContentSubParser.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.xcontent;
import java.io.IOException;
/**
 * Wrapper for a XContentParser that makes a single object/array look like a complete document.
 *
 * The wrapper prevents the parsing logic to consume tokens outside of the wrapped object as well
 * as skipping to the end of the object in case of a parsing error. The wrapper is intended to be
 * used for parsing objects that should be ignored if they are malformed.
 */
public class XContentSubParser extends FilterXContentParserWrapper {