[SPARK-4451]force to kill process after 5 seconds

When we restart history server or thrift server, sometimes the processes will not be launched as they were not totally stopping. So I think we'd better wait some seconds and kill it by force after that waiting.
I do this referring to Hadoop.

https://issues.apache.org/jira/browse/SPARK-4451