[SPARK-4912][SQL] Persistent tables for the Spark SQL data sources

This is the first of a few improvements I'd like to make to the data sources API.  I'll note that this does not correctly handle multiple databases.  However, since much of the code does not, and since I don't think improving this will change the public API, I think its reasonable to handle that in a separate PR.
Should we mark tables from external data sources as external table? We can do this by

```scala
tbl.putToParameters("EXTERNAL", "TRUE")
tbl.setTableType(TableType.EXTERNAL_TABLE.toString())
```