Fix acceptance test race condition related to stop_puppetdb

Since trapperkeeper does a bit more thorough shutdown of all of
the various application components, it may now take PuppetDB
slightly longer to shut down when it receives a TERM signal.

This seems to be causing some race conditions in our acceptance
tests on particularly old/crusty boxes/OS's.  The "sleep_until_stopped"
method in our helper code only checks to see if the web server
is still responding before it returns; a more complete method
would be to actually make sure that the puppetdb PID has exited
before returning control to the tests.  This patch changes
the behavior of "sleep_until_stopped" accordingly.