This commit introduces a `Database` class to encapsulate all
database-related operations. This improves code organization,
testability, and maintainability.
- Created Database class with methods for creating tables,
loading/saving projects, log entries, and settings.
- Added error handling for database connection and operations.
- Implemented methods to load and save invoice numbers.
- Replaced direct database access with Database class methods.