extract the pid test and update State to its own function so we can make sure that containers marked as ghosts at daemon start are actually still running

Docker-DCO-1.0-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)