feat(qc): implement placeholder validation (#5741)
Implement type-aware placeholder validation which rejects placeholders in incorrect positions or with incorrect types.
Previously placeholders were unconditionally accepted anywhere by the query parser, which was breaking query validation and could lead to panics in downstream code.