### Description

The parsing of params in parameterized ES|QL queries appears to be inconsistent with the parsing of non-parameterized ES|QL queries. Some examples on current main:

- ```
  {"query": "row a = 1 | eval x = now() + ?", "params": [{"type":"time_duration", "value":"5 hour"}]}
  ```
  results in the following exception:
  ```
  "type":"parsing_exception","reason":"line 1:23: Cannot cast value [5 hour] of type [KEYWORD] to parameter type [TIME_DURATION]"}],"type":"parsing_exception","reason":"line 1:23: Cannot cast value [5 hour] of type [KEYWORD] to parameter type [TIME_DURATION]"
  ```
- ```
  {"query": "row a = 1 | eval x = now() + ?", "params": ["1 week"]}
  ```
  results in
  ```
  "type":"verification_exception","reason":"Found 1 problem\nline 1:22: [+] has arguments with incompatible types [DATETIME] and [KEYWORD]"
  ```
- ```
  "query": "row a = 1 | eval x = now() + ? week", "params": [1]
  ```
  results in
  ```
  "type":"parsing_exception","reason":"line 1:32: extraneous input 'week' expecting <EOF>"}],"type":"parsing_exception","reason":"line 1:32: extraneous input 'week' expecting <EOF>"
  ```

All the queries work fine if the `?` is manually substituted with the given parameter.

The first two indicate that the parsing of query parameters is not consistent with our normal parsing, type resolution and verification pipeline.

According to @astefan , `version` is affected in a similar way.

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java
Dissect dissect = (Dissect) cmd;
        assertEquals("%{foo}", dissect.parser().pattern());
        assertEquals("", dissect.parser().appendSeparator());
        assertEquals(List.of(referenceAttribute("foo", KEYWORD)), dissect.extractedFields());
        cmd = processingCommand("dissect a \"%{foo}\" append_separator=\",\"");
        assertEquals(Dissect.class, cmd.getClass());
        dissect = (Dissect) cmd;
        assertEquals("%{foo}", dissect.parser().pattern());
        assertEquals(",", dissect.parser().appendSeparator());
        assertEquals(List.of(referenceAttribute("foo", KEYWORD)), dissect.extractedFields());
        for (Tuple<String, String> queryWithUnexpectedCmd : List.of(
            Tuple.tuple("from a | dissect foo \"\"", "[]"),
            Tuple.tuple("from a | dissect foo \" \"", "[ ]"),
            Tuple.tuple("from a | dissect foo \"no fields\"", "[no fields]")
        )) {
            expectError(queryWithUnexpectedCmd.v1(), "Invalid pattern for dissect: " + queryWithUnexpectedCmd.v2());
        }
        expectError("from a | dissect foo \"%{*a}:%{&a}\"", "Reference keys not supported in dissect patterns: [%{*a}]");
        expectError("from a | dissect foo \"%{bar}\" invalid_option=3", "Invalid option for dissect: [invalid_option]");
        expectError(
            "from a | dissect foo \"%{bar}\" append_separator=3",
            "Invalid value for dissect append_separator: expected a string, but was [3]"
        );
    }
    public void testGrokPattern() {
        LogicalPlan cmd = processingCommand("grok a \"%{WORD:foo}\"");
        assertEquals(Grok.class, cmd.getClass());
        Grok dissect = (Grok) cmd;
        assertEquals("%{WORD:foo}", dissect.parser().pattern());
        assertEquals(List.of(referenceAttribute("foo", KEYWORD)), dissect.extractedFields());