Use SQLite instead of yaml

- Make statistics more stable
- Recoded some parts of database interaction
Added yaml statistic converter