[SPARK-2287] [SQL] Make ScalaReflection be able to handle Generic case classes.