Handle cloning all Cases-side records for a case. #3826.
Glue in PSC sync. #3826.

No tests because they'd just be a big mock mess. There's no logic here,
just wiring.
Task for using CaseCloner from the CLI. #3826.
Break loop CL -> C -> CL. #3826.

There are probably others like this, but not looking now.
Refinements for PSC sync part. #3826.

* Correct keygen so that it is random for a run, not random for each key
* Don't save on the cases side if the PSC sync fails
* Debug logging
Use importer_mode if available. #3826.

A clone is like an import in that you are looking to get an exact copy
of the source data. The same sort of record-creating callbacks that
are disabled for imports should be disabled for clones also.
Factor out "importer mode" flag & related. Done with #3826.

Also addresses #3848 along the way.
Disable operational data extraction in import mode. #3826.
Add more case-specific models to clone. #3826.
Avoid theoretical SQL injections. #3826.

This class isn't presently used in a way that the p_id is ever
provided by an untrusted user. And even if it is used in the GUI
later, the UI in front of it would probably not directly receive a
p_id to pass to it. But it doesn't hurt to be safe.
Make sure "nil" is in the behavior description. #3826.
Reset to the original importer mode after exception. #3826.
Merge branch '3826-clone_case' into develop

Provides `setup:clone_case`, a rake task which produces one or more clones of a
participant and all its related persons, participants, and other case-specific
records. It also syncs any primary participants to PSC. This task is intended
for use in setting up training or QA data. Closes #3826.

This branch also fixes #3848 because it involves a refactoring of `Participant`
to share its "importer mode" code with `ResponseSet`.