[SPARK-2710] [SQL] Build SchemaRDD from a JdbcRDD with MetaData

SPARK-2710 Build SchemaRDD from a JdbcRDD with MetaData

and a small bug fix on JdbcRDD, line 109
it seems conn will never be closed


Hi, @chenghao-intel how about use ```for (i <- 1 to schemaFields.length) { ... }``` here? better than ```while (i < schemaFields.length) { ... i+=1 }``` ?