Migrations: Fix to upgrade from 0.4.0 migration

Fix 0004_v0_4_0 migration to match what's in the stable/0.4.0 branch.
Update the fedora and duracloud migrations to upgrade properly.
Add reingest button and endpoint

refs #6488

Add endpoint and button to Packages list for re-ingest. Reingest form
added so user can select which pipeline to reingest on as well as the
type of reingest.
Implement reingest start

refs #6489

Fill out the stub of reingest on the Package model. Reingest copies the
package to SS internal location, extracts it if it's a file, copies a
subset of files to the pipeline's currently processing location, then
deletes the temporary copy.  The METS is always a required file, and all
objects (preservation and original) are required for access reingest.
We only create access copies from originals now, but will from
preservation in the future.
Call approve reingest endpoint in dashboard

refs #6488

Copy the reingest files to a staging directory on the pipeline, and call a
SIP reingest endpoint to notify Archivematica.  This allows the pipeline to
do some pre-processing of the SIP, such as clearing the database of old
information.

Enable PATCH for pipelines, specificially so that 'reingest' can be reset by
the pipeline.
Add fixity check

refs #6488

Run fixity before starting reingest of AIP.  Update for extract changes and
not assuming the package is locally accessible.

Squash with 'Implement reingest start'?
Rough out finish_reingest AIP

refs #6488

Add PUT to support finished reingested AIPs, and used a modified obj_update
to call a hook before saving the object.  This hook calls finish_reingest if
it's a reingested AIP.  PATCH limited to only fields listed in
allowed_patch_fields, currently just 'reingest'.  Add rough implementation
of finish_reingest. Update bagit version to support updating manifests.
Consolidate event generation for pointer files

Move event and agent generation for pointer files to utils, and add a
wrapper function that handles everything for adding events.
Update pointer file in reingest

refs #6488

Update checksum and add another compression event after reingest.
Compression event information is stubbed out.

Squash with 'Stub out finish_reingest AIP'?
Reingest AIP: recompress based on reingested compression

refs #6498

Update reingest to parse the compression algorithm out of the reingested
pointer file and use Package.compress_package.

To handle a different compression algorithm resulting in a different
package name (eg .7z vs .tar.bz2) or the AIP being stored in a different
location, do not update the current_path or current_location in the
PackageResource.  Reingest endpoint will reset the current location & path
to match the DB, and pass in the reingest location & path, to be updated
once the package has been successfully reingested.

Squash with 'Stub out finish_reingest AIP'?
AIP Reingest: Update pointer file

refs #6498

Update pointer file for reingested AIP.  Notably: fixity checksum,
FLocat, size, and several compression related fields.  Move pointer
file changes to own function.
AIP Reingest: Delete old AIP if name changed

Delete the old AIP if the Location or path have changed (eg from different
compression).
Reingest: Handle non-JSON errors

refs #6488
Reingest: Handle missing metadata dir

refs #6488

Also fix comments, remove prints.