(GEP-171) Support the * => syntax in resource expression

Ensure that '*' can be used as an attribute name, but only if
target platform >= 4.0. Also check that LHS of attribute is either
dynamic or a literal hash.

This PR extends from the issue-172 branch to avoid merge conflicts.
This message does not work well when the name is '*' - it could say "Duplicate use of '*'" instead of "Duplicate attribute" to make it more understandable that it is not talking about the contents of the hash (which is also validated to not contain keys that are already given as attributes).