Test against Rails 4.0.0.beta1, and fix deprecation warnings

This continues the work started by @NARKOZ in #125. It's pretty simple, with the exception of this part in the test suite (not the library itself):

```ruby
# Rails < 3.1 doesn't support lambda default_scopes (only hashes)
# But Rails >= 4 logs deprecation warnings for hash default_scopes
if ActiveRecord::VERSION::STRING < "3.1"
  model.send :default_scope, { :conditions => default_scope_params }
else
  model.send :default_scope, lambda { model.where(default_scope_params) }
end
```

Someone more familiar with `default_scope` than me might be able to come up with a better solution.