Allow pathname logic to be overridden in connection config.

This allows you to customize how pathnames are generated before sending requests. The default logic can be overridden per-connection.