Use set_url_scheme() where appropriate.  Remove some old back-compat stuff for when we supported < 3.7.