Make tool able to do oauth against new and old OAuth configurations

Previously, the tool was hard-coded to use "?close" at the end of
redirect uris when it did OAuth flows with e.g. package servers or build
farms. Now, we use the same logic that the server uses to compute its
redirect uri: we add "?close" if a loginStyle option is present in the
configuration.