Tweak url formatting

See http://forums.musicbrainz.org/viewtopic.php?id=5394 for original issue (with discogs) and proposed fix.

This tweak goes slightly beyond this, only providing a specific port if it is not 80 or 443.

Thanks to DrunkenDwarf for his proposed fix which inspired this PR.
@phw What the previous code did was to convert any webservice call which required MBLOGIN (i.e. collections) to https in order to keep personal data encrypted. However, it might have been better to have fixed this where the call is made with mblogin set instead. I can fix this as part of this PR if you agree.