Add support for referenceOnly metaprocedures.

Metaprocedures that only operated on references (nameof, parentof)
would crash when they were invoked on non-reference objects.

The metaprocedure procedure has been extended with an referenceOnly
field that indicates it should only be called for reference values.

Additionally, a bug was solved in ElementExpr where isReference wasn’t
set when the element type was a reference.