### Elasticsearch Version

8.9.0

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

any

### Problem Description

If the context text supplied to the Question Answering task is longer than the model's `max_sequence_length` and `truncate` is set to `none` then inference on the model fails with the message:

```
status_exception: question answering result has invalid dimension, expected 2 found [6] 
```
<img width="1438" alt="Screenshot 2023-07-25 at 08 21 37" src="https://github.com/elastic/elasticsearch/assets/2353640/12d296f6-03b2-4cda-89ce-7399348c4104">


### Steps to Reproduce

Use long input text to the question answering task


### Work Aroundf
The fix is to truncate the context which unfortunately may remove the part of the document containing the answer. For reference the call is documented here

```
POST _ml/trained_models/distilbert-base-cased-distilled-squad/deployment/_infer
{
  "docs":[{ "text_field": "question answering context"}],
  "inference_config": {
    "question_answering": {
      "question": "The question to ask",
      "tokenization": {
        "bert": {
          "truncate": "second",
          "span": -1          
        }
      }
    }
  }
}
````

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/nlp/QuestionAnsweringProcessor.java
public NlpTask.Request buildRequest(List<String> inputs, String requestId, Tokenization.Truncate truncate, int span)
            throws IOException {
            if (inputs.size() > 1) {
                throw ExceptionsHelper.badRequestException("Unable to do question answering on more than one text input at a time");
            }
            String context = inputs.get(0);
            List<TokenizationResult.Tokens> tokenizations = tokenizer.tokenize(question, context, truncate, span, 0);
            TokenizationResult result = tokenizer.buildTokenizationResult(tokenizations);
            return result.buildRequest(requestId, truncate);
        }
    }
    record ResultProcessor(String question, int maxAnswerLength, int numTopClasses, String resultsField)
        implements
            NlpTask.ResultProcessor {
        @Override
        public InferenceResults processResult(TokenizationResult tokenization, PyTorchInferenceResult pyTorchResult) {
            if (pyTorchResult.getInferenceResult().length < 1) {
                throw new ElasticsearchStatusException("question answering result has no data", RestStatus.INTERNAL_SERVER_ERROR);
            }
            
            if (pyTorchResult.getInferenceResult().length != 2) {
                throw new ElasticsearchStatusException(
                    "question answering result has invalid dimension, expected 2 found [{}]",
                    RestStatus.INTERNAL_SERVER_ERROR,
                    pyTorchResult.getInferenceResult().length
                );
            }
            double[][] starts = pyTorchResult.getInferenceResult()[0];
            double[][] ends = pyTorchResult.getInferenceResult()[1];
            if (starts.length != ends.length) {