Upgrade to rails 3.1

It looks like pull requests are often generated before the feature branch is complete, so that it can be used as a discussion forum.  I'm thinking it may make more sense to have discussion of the details of this work here, than on mo-developers.  It'd be better to restrict mo-developer to more high-level discussions.  I'm worried that the other users on mo-developers are now ignoring it because of all the chaff we've generated lately.

I'll start working on unit tests today.  Shouldn't take long.

Then we need to decide whether we should fix AccountMailer and ActiveRecord.find now or wait until it becomes a problem (rails 3.2 or 4.0).