(#22363) Make errors for illegal Class[x] references better.

This adds additional checks for Class[x] operations and adds more
tests. This also removes hyphen as a legal character in regexp patterns
used for checking (the lexer already did not include the hyphen and
they were flagged as errors. This change affects when strings are
checked for compliance with the name rule.
(#22363) Add compiler integration test for future evaluator

(This was missing in an earlier commit)
(#22363) Improve validation of names and variables

The validation of names and variables was too relaxed. The lexer
had stricter rules in some cases and validation rules for numeric
variables were too relaxed.

Patterns used in validation are now stricter.
(#22363) Improve error for Class[File['foo']]

The label produced for File['foo'] said "File['foo'] Type", now
it says "File['foo'] Resource Reference" (if it has a title) and
"File Type" if it does not.