[SPARK-2752]spark sql cli should not exit when exception

Spark sql cli now will exit directly when we input a bad sql, fix it by catching the exception and print the error~
I think we can simply change `IOException` to `Exception` and remove the next `case e: Exception` clause to make this more concise. Also, the `stringifyException(e)` call can be useful for diagnosing SQL statements/scripts.