implemented resource 'collection' type and 'contains' relations

Also added config to constrain which types of relations are allowable for which type of subject resource.

Closes #55