Add URLSearchParams interface with serialization support

Blocks #2282