[dataimport] backport massive store from dataio cube
Some tweaks have been made to work with 3.21 foreign key constraints.
Also test are not executed in our own pg cluster instead of polluting the system
one.
Closes #5414760
if not rql('CWConstraintType X WHERE X name "RQLUniqueConstraint"',
ask_confirm=False):
rql('INSERT CWConstraintType X: X name "RQLUniqueConstraint"',
ask_confirm=False)