Improve check of async job status

Check all types of result codes for async job queries. Should solve
problem with failed deployVirtualMachine API calls hanging until
timeout.