Remove internal options from query string of paths

Fixes #17057

I DRYed up `polymorphic_path` to use `polymorphic_url` (introduced in cfdda38088c95194c3d8bb2fedb70bc06e8fe2e0).
/cc @tenderlove