[SPARK-4866] support StructType as key in MapType

This PR brings support of using StructType(and other hashable types) as key in MapType.