Suppress ResourceWarning unclosed socket message

When working with Python 3.3 and the `debug` parameter set to `True`, the default wsgiref server will emit a `ResourceWarning: unclosed <socket.socket object, fd=3, family=2, type=1, proto=0>` message when using ctrl+c to stop the server.

This change explicitly closes the server when ctrl+c is detected, preventing the warning from being displayed.
Fix except syntax for Python 2.5
Merge pull request #648 from wbond/master

Suppress ResourceWarning unclosed socket message