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.