Rework URL handling for rust-url

This is a first-pass.  I have not redone the tests, nor run the tests, so the code might have issues still, but it does compile.