Cherry picks from current/for_cpan_index (flux due to not-yet-clear-policy)

This is an amalgamation of:
- f6fff270
- 293dccfc (corrected version of b63585bd)
- 77cc50d1
Weaken $self to avoid leaks with nested closures on 5.8
Use transaction-local SET CONSTRAINTS for Oracle as well

This is documented to be equivalent to the PostgreSQL and Interbase
behaviour, and is supported as far back as ALTER SESSION SET
CONSTRAINTS is (i.e. 8.x), according to the documentation.

This could then be factored out to a component, potentially to be used
by other storages that support the same syntax.