Fix Rails 4 deprecation warnings (this time with passing tests)

In Rails 4 you should not do the following any more:

    has_many :children, order: configuration[:order], # Etc.

Instead the order should be passed in a scope:

    has_many :children, lambda { order configuration[:order] }, # Etc.

This pull request fixes that.

It also fixes Rails 4 deprecation warnings in tests.

Note: I'm relying on `ActiveRecord::VERSION::MAJOR` to make sure the gem keeps working in Rails 3. Not sure if the way I've implemented that is desirable.