formatting change
Refactoring leaderboard_helper

Refactoring to reduce DB calls, loops and join operation are implemented in methods.
Refactoring leaderboard

Removing some unnecessary loops.
Minor bug-fixes
Minor refactoring - renaming
Refactored method added
Refactoring extractPersonalAchievements
Minor refactoring and bugfix for extractPersonalAchievements
Commenting dead code and old methods
Removing commented methods from Leaderboard model
Merge https://github.com/expertiza/expertiza into rails4

Conflicts:
	app/models/system_settings.rb
Merge pull request #444 from sanjeevs/rails4

E1467: Refactoring Leaderboard model