(bug 44330) When a user logs in on HTTPS, set a cookie to force them to stay on HTTPS

This uses existing functionality in core to emulate how things work
on the desktop site, to ensure that when a user logs in to the site
using HTTPS, but attempts to view a page on HTTP, they will be
redirected to HTTPS.

Change-Id: I0bcd52581279f9d35087bd9be91b5dc01fa9f702
Merge "(bug 44330) When a user logs in on HTTPS, set a cookie to force them to stay on HTTPS"