Improve the HTTPS detection

This PR was submitted on the symfony/HttpFoundation read-only repository and moved automatically to the main Symfony repository (closes symfony/HttpFoundation#16).

Alternative https detection, when some nginx servers don't set flag $_SERVER[HTTPS]=on, even though a connection is https.