MDL-45985 ddl: improve check_database_schema method in database_manager
MDL-45985 cli: add new cli tool for validation of database structure