Extract arel-building code into module.
Merge branch 'arel-builder-refactor'