[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.
Oh yes. I was reading part of HCatalog code, which is actually manipulating `metastore.api.Table`, whose `setTableType` method accepts a string.