cookie session: add support for multiple x-forwarded-proto values

related to visionmedia/express#1646
basically copied from https://github.com/visionmedia/express/commit/8ab44081d4a6812e6dc790bbc2f9305f9d88eff4