Fix after_commit hook issue in Rails 4 (Heroku)

* after_commit hook does not always work
* let ActiveRecord default to the old hooks