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 #589 from caskdata/feature/cherry-pick-fix-unit-test

Cherry pick fixes develop to fix unit test