resources: return overlapping Alloc in allocate_at
resources: return overlapping Alloc in allocate_at

If AddressAllocator::allocate_at() fails, check if there is an existing
overlapping allocation and return it with Error::ExistingAlloc if so;
otherwise, return Error::OutOfSpace as before. This allows the caller to
distinguish between failure due to overlap and failure due to a range
that is not managed by the allocator at all.

BUG=b:188011323
TEST=cargo test -p resources

Change-Id: I1f6cde63a995dc461db221c509f4d0a1f0c7f186
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3498208
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Junichi Uekawa <6bd240a6ce32463e272bb69c685a8e946b33ac05@chromium.org>
Commit-Queue: Daniel Verkamp <72bc170b46ec491f7bdd4359a1c0bfed274de40c@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm