Introducing Wait for server state and up to dating wait for server status

* New behaviour wait for task state
* Updating wait for image status
* Reverted variable changed wrongly server_id to server.id which actually should work in same manner
* Added checks for API availability - making sure that the API call in the method generate proper response status and entity

Change-Id: I9cc6f0b94479e898da372d20c94764550ed9afcc
Merge "Introducing Wait for server state and up to dating wait for server status"