Use lambda when defining Rails 3 scopes

The intention of this change is to ensure, that in Rails 3 the aasm scopes are defined at runtime (same as for Rails 4).

This fixes a problem with Rails migrations: When Rails runs migrations for creating a table for an aasm model, the aasm model could already be loaded (for example when using observers in application.rb). When loaded, it tries to access the database and fails because the table does not yet exists.