Use arel_table instead of table_name and class_eval.

This is to ensure that the scopes can be correctly chained upon other scopes and work correctly across joins.

(This builds on https://github.com/pjb3/has-bit-field/pull/12)