Use secure cookies when the server is using SSL.

This registers a new middleware setting connection.proxySecure to the
appropriate value.
Merge pull request #309 from ametaireau/fix-secure-cookies

Use secure cookies when the server is using SSL.