Introduce a core type id macro collection and change all nodes to use it
Make Expression::type return an error type expression as opposed to null
Unify the type id mechanisms of Node, Item, and Shape

The newly introduced Reflect and typeIdMacros in Core are used for
everything.