Component dependency improvements

Add Dependency constructor function,
Improve performance of getComponents with AllowDerived = yes when T is a
final class.