fix countByUser function queries
improve users listing
remove distinct
add temporary users_points updating
remove ordering by points on the fly
Merge pull request #716 from ahilles107/fix_performance

fix countByUser function queries