do not append a second slash when using `trailing_slash: true`

The source issue is #8700

```ruby
# before
root_url # => http://test.host//

# after
root_url # => http://test.host/
```

I changed the code to only append a "/" when the current path does not already end with "/". I added the test-case to routing_test instead of url_for_test to make sure, the right arguments are passed to `url_for` and end up in the right url.