test(functional): Don't use a dead test server

It appears that when running in the gate, the wsgiref server sometimes
goes away. This adds a check to only reuse a server instance if it
is still alive.

Change-Id: I87716f9feb80da63a6b8c1f629178b396dbeb4c6