Check identifiers (const variables and unnamed enums) and named
enums when parsing dictionary literals whether the keys are not
duplicated.
In case of duplicate key is encountered, highlight the line with it
and print error message:
`Duplicate key "foo" found in Dictionary literal`
This commit is a logical continuation of the commit dab73c7 which
implemented such checks only for literal keys (which fixed#7034).
Apart from that, this commit also fixes the issue with the error
message itself, which was shown one line below the duplicated key
in case it was the last one in the dictionary literal and there
was no hanging comma.
Also, the format of the error message has been changed so that now
the error message also contains the value of the key which is duplicated.
Instead of `Duplicate key found in Dictionary literal`, it now prints
`Duplicate key "<value>" found in Dictionary literal`
Fixes#50971