Allow more gracefull shutdown of wsgi server

Currently, if the listening socket is closed the
wsgi.server will go into an infinite loop.

Add a 'server_running' flag which can be set to
tell the server to exit. This allows, for example,
a signal handler to initiate a gracefull shutdown
(complete existing requests then exit).
Quick question: Would it allow slightly more flexibility if we only did pool.waitall() here if a custom pool was not passed in? If passing in a custom pool you could then decide whether or not to do a waitall after the server function has exited.