(#8040) Add a function to specify containment

This adds the 'contain' function. When used inside of a class definition, it
will create a containment relationship such that the current class contains
the argument of 'contain'.
(#8040) Don't allow duplicate contain calls