Removed command locks if not running

- Done periodically with monitorSynchronizedCommands()
- Done before checking locks when a command is being started
Added test for CM_Cli_CommandManager::monitorSynchronizedCommands()

- Made CM_Cli_CommandManager::_getProcess() static for testability
Made CM_Cli_CommandManager::monitorSynchronizedCommands() non-static

- Adjusted usages in CM_Maintenance_Cli and in tests
- Made CM_Cli_CommandManager::_getProcess() non-static again
Merge pull request #1263 from fauvel/issue-1263

Invalidate NOT running processes for the local machine