Rails 4.0.0rc1 compat

I noticed a couple deprecations and a failing spec with Rails 4 RC1. This PR fixes them. ActsAsTenant breaks with the latest Rails head—I have a separate PR for that.