Avoid waiting too long for a response after the build completes (#3698)
curl can wait for a long time for a response, potentially forever, so
there was no upper bound on how long each test.is_accepting_requests()
call could take. Now each call is being limited to 5 seconds.
Also, our "while not accepting requests" loop was intended to wait up to
60 seconds for the app server to start accepting requests, but it was
actually giving it 60 chances to respond to a request, which might take
much longer than 60 seconds. Now it's really waiting 60 seconds,
approximately.