Generate correct sort URL if query parameters are present

I'm using the following `default_url_options` in my `ApplicationController`:

```ruby
def default_url_options
    { locale: I18n.locale }
end
```

This causes URLs of the form `/admin/blocks/1?locale=de` to be generated. In commit ef606b340a38f1a440364d506dcb978b8483ca79, the sort URL is created by appending `/sort` to this URL, which leads to the following incorrect result:
`/admin/blocks/1?locale=de/sort`

This PR fixes the problem by splitting off the query parameter first, appending `/sort`, and then again appending the parameter:
`/admin/blocks/1/sort?locale=de`