[#740] Fix POSTing of changeemail

* rely on $r->did_post, instead of a submit mode
* if on an https page, submit to https
Merge pull request #740 from afuna/changeemail-post-bug-740

Fix "change email" function