Add domain level lambdas.

Get rid of DomainType as separate from DomainExpression (which can now add a head using a lambda).
We can now keep track of the scoped domains and units that are valid in a given context.