cleaning current_server_helper_method

Upstream pull request to clean up current_server helper method (using actionpack features https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/url.rb#L111)