Use the official WSGI way to detect if the application is in https

http://www.python.org/dev/peps/pep-3333/
Merge pull request #860 from camptocamp/https

Use the official WSGI way to detect if the application is in https