Rails 4 compatibility

Lifted many Rails 4 incompatibilities from the paper_trail project. Seems to be working in my Rails 4 app so far.