Fix the race condition between program stop and program status check and start.
- They should be using the same way to check if a program is running

Also some code refactoring to make the code cleaner
Plus a concurrency bug fix in getting program status for MR in workflow
Use future to carry the workflow client result instead.
fix checkstyle issue.
Merge pull request #488 from caskdata/feature/fix-easy-fail-test

Fix the race condition between program stop and program status check and start.