cli - evaluation of async task status refactored

We had duplicate code on many places.
New util functions 'evaluate_task_status' and 'evaluate_remote_action'
take care of printing the correct output message and return value.
Merge pull request #1585 from tstrachota/async_refactor

cli - evaluation of async task status refactored