Fix future compatibility with Active Record 4.2

Use Arel::Nodes.build_quoted to quote strings if present, otherwise fall back to preexisting behavior.