[SPARK-2594][SQL] Add CACHE TABLE <name> AS SELECT ... (Updated as per review comments)

Updated as per the review comments of Admin.
Previous pull request is https://github.com/apache/spark/pull/2381
I'm thinking about merging `CacheCommand` into this class, since the former can be a special case of this one once we make them consistent with each other in laziness. But this can be addressed in a follow up PR.