Add missing semicolons etc. to satisfy JSLint after changes for WTD-1482.
Implements support for rules which determine which objects are allowed to contain other objects, typically by type.