Fix wait on stopped container (after docker restart) + add Unit test for that case

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Merge pull request #3706 from creack/fix_wait_stopped

Fix wait on stopped container (after docker restart) + add Unit test for that case