Optimize :within_mx_range

Rewrote queries in :within_mx_range to use Rails 3 ActiveRecord query interface (.where instead of :conditions)
Big speedup