fix(declarative) fix memory leaks when loading a declarative config that fails schema validation
fix(declarative) fix memory leaks when loading a declarative config that
fails schema validation

When a declarative config fails schema validation, we attempts to
re-load the config again after populating the foreign keys
(see `kong.db.schema.others.declarative_config.flatten`).

Inside `flatten` we call the `kong.db.schema.others.declarative_config.load`
function, which reloads the schema objects and insert them into
the `all_schemas` global table without first clearing it.
The result is that the `all_schemas` table will keep growing
indefinitely and eventually causes Nginx to be OOM killed.

This PR attempts to fix the issue by clearing the `all_schemas` table
every time `load` is called, which according to my test indeed prevents
the memory from leaking anymore.

closes #5732

Kong/kong,Kong/kong,Kong/kong