api: getuserstat

refactor large parts of userstat and make it accesible from api
Merge branch 'patch-2' of https://github.com/LinusU/wizstats into LinusU-patch-2
revert userstats.php changes from pull request
sql optimization
fix bug with start date in api for getacceptedcount
sql optimiziation