(#8040) Add a 'contain' function

This adds the 'contain' function. When used inside of a class definition, it
will create a containment relationship.