Fix deprecated use of scope by using lambda.

scope (and default_scope) without lambda have been deprecated in Rails 4.
This change fixes that and also removes support for Rails 2.
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.
Merge pull request #13 from schuetzm/use-arel

Use arel_table instead of table_name and class_eval.