Retrieve missing container command after pulling from index

Docker driver spawns container with wrong command "sh"
if image doesn't exists on nova node.
'Cmd' assigned before pulling image, hence docker 'inspect'
of unexisting image returns empty command.
Solution: refactor code to first check if image exists,
pull if not and inspect only after pulling.

pulled from: https://review.openstack.org/#/c/65393/15

Change-Id: Ib84ed3204dcfa084b4955b899e15e37d14c3f685
Closes-Bug: #1266875
Merge "Retrieve missing container command after pulling from index"