DRY up active_record adapter methods with WhereBuilder class.

@ideadapt is this the essence of your changes in #1 ?