Backports PaperTrail compatibility and other fixies to rails-3.x

To integrate rails_admin to myapp written by Rails3 and PaperTrail3.0,
I cherry-picked following commits from master branch to rails-3.x branch.

- fbf692499ac55a3515d52ac179d34ab4a1f98e2c
- 19d8975e35a635dd2d79b34842f28c12007a8da2
- 16980c0b330de8a76af256caaedcfb2dad09aa04
- 959e1bd4e47e0369d264b58bbbe972ff863767cd
- 072a7a7a84e99949284fbc584b0b67becbc25502
- 6136fd5ab92743490266a223dda21a3c9a8d392f