DV2 DetectionBase knows more about allocation statuses

This PR was spawned from comments in #345.  It contains a chunk of refactoring, followed by a few feature adds:

- give a specific error message when an allocation is archived
- notice purged or invalid allocation links and continue seamlessly
- add a bit more instrumentation
@iferguson90 Thanks for pointing out that smart match is unstable.

I also agree that we should be asking the Allocation object, though I think I will leave it for now.