More graceful stop for testing daemon

Fixes problem with TestDaemonAllocatesListeningPort

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Merge pull request #9796 from LK4D4/fix_test_daemon

More graceful stop for testing daemon