exam_lib: save stats in one file

database table history is enough to build all stats
db: set passed and failed -1 in history on delete