simple solution that brings rake stats task to all rails project

solution works with rails apps, plugins (simple, full, mounted, with and without activerecord or dummy app, and any combination of those)
Better then already merged #15299, has no issues reported in #15308 or found in #15317... finally