Use a common method to inject into ActiveRecord

Instead of having duplicate code (in `lib` and `spec`) to inject our methods into `ActiveRecord`, let’s use the same pattern we used in [emotions](https://github.com/mirego/emotions) and use an `inject_into_active_record` method in both places.