Client should not crash Server when db is empty

* solved a bug in getQuery fn.
* solved a bug in initPQ fn.
* solved a bug in getStats fn.
made importCassandra fill tests_by_score also
Added support for empty test_by_score table