rails/arel — pull request #277 by sergey-alekseev (2014-05-26 13:45:26+00:00)
Title: Wrap nested Nodes::Grouping in brackets only once

Tested on Rails 4.1 application with mysql2.

```ruby
# Before:
Developer.where(id: [1,nil])
# SELECT `developers`.* FROM `developers` WHERE ((`developers`.`id` = 1 OR `developers`.`id` IS NULL))

# After:
Developer.where(id: [1,nil])
# SELECT `developers`.* FROM `developers` WHERE (`developers`.`id` = 1 OR `developers`.`id` IS NULL)

# Unfortunately, there are still extra brackets in the following queries, but I'm tired debugging Arel
# Notice 2 spaces before WHERE as well
Developer.where.not(id: [1,2])
# SELECT `developers`.* FROM `developers` WHERE (`developers`.`id` NOT IN (1, 2))
Developer.where.not(id: [1,nil])
# SELECT `developers`.* FROM `developers` WHERE (NOT ((`developers`.`id` = 1 OR `developers`.`id` IS NULL)))