[ WIP ] Fix  Skip distr page and store stats pers revision in db

Hi @gwicke   , 

can you please test this for me only, I am some issues in solving a error.

Steps to reproduce the error --

1.  Empty db and refill the test table
2.  'git reset --hard ' client to older commit
3.  Start server and start client. (Every thing will work fine at this stage)
4.  Stop client and "git pull origin master" (pull the latest commit at client)
5.  Start client you will see some error  also notice the call to this console.log statement and see the output 
https://github.com/gwicke/testreduce/compare/new-master?expand=1#diff-684979df724ae9649850b3ce7ba8651cR445

One possible problem could be the way commit are sorts.