Utils.build_nested_query to handle empty arrays and hashes

Hello,


In master we have the following:
```ruby
Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => []) #=> "foo=bar&"
Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => {}) #=> "foo=bar&"
```

The pull request turns it into:
```ruby
Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => []) #=> "foo=bar"
Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => {}) #=> "foo=bar"
```


Regards,
Ivan