make event_id generator from db, add missing stats_db.go