Generic mapping for non-collection type

These changes fix wrong treatment of non-collection generic types: in upstream version they are treated as collection generic types, so if generic type is instantiated with value type, it is mapped to its underlying type, so "Tuple<int, int>" gets mapped to "integer". Here I'm just checking whether type implements ICollection and use underlyiung type only if it is. Also, basic test is provided. (And I've signed CLA =)