Generic mapping for non-collection type

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