More flexible HEROKU_POSTGRESQL_HOST env var handling.

Because Shogun staging environments are now set up on herokuapp.com
and RestClient doesn't follow 301s, that means some commands (like
`heroku pg:reset` and `heroku pg:credentials --reset`) don't work in
staging. This change always points to herokuapp.com for staging
Merge pull request #816 from deafbybeheading/fix-pg-staging

Better HEROKU_POSTGRESQL_HOST env var handling for staging
Merge branch 'master' of https://github.com/heroku/heroku