Support covariance and contravariance in generic types

Support covariance and contravariance in searching common generic types (to
make arrays, etc.)
Fix bugs and modify the behavior of Type.IsAppropriate extension method.
Remove unused internal extension methods.