change how relations are detect so that it can work with proxies

This is a very minor change that doesn't require an ActiveRecord::Relation to be passed to initialize grid.  Instead it checks to see if the class is a child of ActiveRecord::Base.  I needed this for my app after adding the octopus gem for db sharding because the octopus returns a proxy for activerecord relations that is not actually an ActiveRecord::Relation.  Could be this just moves the problem somewhere else but I think it's a good bet, that if you're passing an actual model class, that it really will be a class and not some sort of proxy.  Thanks for your consideration of this.