Refactor `switch_http_and_https` hook.
Move `switch_http_and_https` to root of hooks directory.