Fix ... Range conditions sanitization

Hi all,

Currently, :conditions => {:foo => 2.0..3.0} and :conditions => {:foo
=> 2.0...3.0} both sanitize to "foo BETWEEN 2.0 AND 3.0", which is
incorrect - Ruby's Range object is defined to exclude the end value
when you use ... to create the range, so we need to output "foo >= 2.0
AND foo < 3.0" in this #exclude_end? case.

The patch I've attached to #1865 fixes this behavior. I made a small
refactor to the two calls to attribute_condition to support passing
along the (quoted) attribute name so that it can be mentioned more
than once.

Any chance we could get this into the next release?

Cheers,
Will