Tweak the API for URLStreamHandlerFactory

This follows up on candrews committed change.