Add a replace() method to _URLMixin

It creates a new instance with some fields being replaced with new
values.
Use namedtuple's existing _replace method
Merge pull request #387 from ThiefMaster/url-replace-method

Add a replace() method to _URLMixin