cannot overwrite registered factory in PolymorphicDomainObjectContainer

- Throwing GradleException when attempting to register
a factory for a type that is already registered. might need a better typed exception.
add integ test coverage for edge cases

- apply plugins which declare the same LibraryType
- component model and rule creating this model in different nested classes