[SPARK-2917] [SQL] Avoid table creation in logical plan analyzing for CTAS

Yes, that's a leaf node, and actually the child would be `InsertIntoHiveTable`, however, the `InsertIntoHiveTable' requires the table was existed in logical plan analysis, hence I pass in the `MetastoreRelation => InsertIntoHiveTable` as the parameter of `CreateTableAsSelect`.

You're right, the name `subquery` is quite confusing, I will change it, but it should be well transformed in `HiveStrategies`, see `case logical.InsertIntoCreatedTable(database, tableName, child)` in `HiveStrategies`.