Add support for test database cache without postgresql client
With #6030 (closed), we will no more be able to use pg_dump/pg_restore for the tests because the standard docker image of Python does not have it.
We could create a custom docker image with the postgresql client installed but we could not guarantee to have the same version as the postgresql docker image.
So the idea is to not use pg_dump/pg_restore but to create database copy on postgresql serve using the template option of "CREATE DATABASE".