Take patternType into account for diagnostics
Created by: lguychard
Closes #7698
Matches the behaviour of the backend by:
- Warning the user that quotes might be useful if the query contains a colon in regexp search.
- Not warning the user if the query contains a colon in literal search.
- Warning the user about literally interpreted queries containing quotes in literal search.
- Not warning the user when using quoted strings in regexp search.