restrict activerecord to versions 3.x through 4.x

After removing Gemfile.lock, the test suite fails on Ruby 2, because
activerecord 2.3 fails on Ruby 2.

Restrict our activerecord requirement to versions 3.x through 4.x in
order to ensure Ruby 2 compatibility.