Done adding code to handle the empty databases (fix bug)

Currently there are three cases if the tables are empty:

1)Commits table is empty
2)Tests table is empty
3)test_by_score table is empty

Currently the code does not crash if these are empty.

Important comment:

Commit database cannot be empty because later on code will try to do .hash on an undefined obj and it will crash. That code only executes if and only if the commits table is not empty.

Any suggestions on how this should be handled feel free to tell me! :)

Also, the importCassandra.js sript does NOT add anything to the commits table, so just running that will not be enough for me to continue working on perf. stats. Do we have a script that fills in the commits table?