[CDH] Add validation for spark

We add validation code for spark service. SPARK_YARN_HISTORY_SERVER
number should be 0 or 1, and it requires YARN service existing (we
use RESOURCEMANAGER process number to check).

Closes-Bug: #1398679

Change-Id: If96ce6a13005ba2a54dc4a1b060f98405ff67cde
Merge "[CDH] Add validation for spark"