Implement the archive delete API endpoint.

Also fixed tests not properly skipped in the case Mongo
has no JS support, and improved the test separation
when counters are exercised.
I would remove the reference first and then the actual entity, so that we don't end up with references that point to no blobs. Having a blob that can't be referenced is less error prone.