[SPARK-3658][SQL]Take thrift server as a daemon

https://issues.apache.org/jira/browse/SPARK-3658

And keep the `CLASS_NOT_FOUND_EXIT_STATUS` and exit message in `SparkSubmit.scala`.
The key difference between `HiveThriftServer2` and other daemon processes is that `HiveThriftServer2` should be started with `spark-submit`. Instead of making `HiveThriftServer2` a special case here, it would be better to add `spark-submit` support for `spark-daemon.sh`. For example, using a special command named "spark-submit", and put the class name as the first arguments.