bug 1073923 - add url.toJSON() method
Merge pull request #1658 from zombie/1073923-url-toJSON

bug 1073923 - add url.toJSON() method, r=@jsantell