do_curl_getinfo: fix misplaced #endif
runwsgi.py: start the server explicitly at 127.0.0.1

Otherwise it may start on ::1, which would consequently break self-test.