ActiveRecord & ruby optimizations

- select(:foo).map(:foo) -> pluck(:foo)
- select(:foo).collect(:foo) -> pluck(:foo)
- map { |foo| foo.bar } -> map(&:bar)
- map { … }.flatten -> flat_map { … }
- collect { … }.flatten -> flat_map { … }
- gsub() -> sub()
- gsub() -> tr()
Merge pull request #255 from codebender/ar_ruby_optimization

ActiveRecord & ruby optimizations