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
The `not -l $instance_output` was intentionally removed, the total logic was:

```perl
if (-l $instance_output or -e $instance_output) {
    if (not -l $instance_output and -d $instance_output) {
        do_the_thing();
    }
}
```

Which is equivalent to:

```perl
if (-d $instance_output) {
    do_the_thing();
}
```