Completely overhaul insert_package and related funcs
Completely overhaul insert_package and related funcs

Most of what I'm doing involves uncertainty about what happens when we
ask for PIDs, or ask to create(). This re-write cleans up
insert_package() so it's shorter and calls out to functions that handle
the various pieces of inserting a package. Uncertain function calls
like create() are wrapped in tryCatch statements and errors are (in
theory) handled.

This rewrite also changes what is passed in and out of functions.
insert_package() still takes an inventory and a package identifier, but
now returns a (potentially) modified subset of the inventory -- the
subset related to that package. What I mean by potentially is that, if
a PID is created for an object but the object itself fails to create,
we modify the subset of the inventory to save the PID so we don't have
to mint the PID the next time. More on this in future documentation.

NCEAS/arcticdatautils