Support for and testing against pre-4.1 Rails

`ActiveRecord.gem_version` was introduced in 4.1, and it seems to be the only thing stopping us from supporting older Rails versions. Added 3.2 and 4.0 to the build matrix and altered usage of `ActiveRecord.gem_version` to work for pre-4.1. @greysteil could you review? I don't remember there being a specific decision to drop old-Rails support, if there was we should document it instead.