[SPARK-2189][SQL] Adds unregisterTempTable API

This PR adds an API for unregistering temporary tables. If a temporary table has been cached before, user can unpersist it as well.
This method is added to ensure `CacheManager` thread safety. (However, the catalog within `SQLContext` is not thread safe, which should be fixed in another PR.)