EXT_external_objects requires an image that aliases a GL texture to have the
mutable format bit and every usage its format supports.
Put the allocation behind a driver interface, so tests can run init, allocate,
reset and the fallback to mapped planes without a GPU.
Drain GL errors before the imports, so a stale error can't make a successful
import look failed and close a descriptor that GL now owns.
The fence calls now act on a fence the caller keeps, so the interface no
longer passes it around as void *. The copy loop stops at the first
failure with std::ranges::all_of instead of testing the status in the
loop condition.
Move the per-frame handoff and the GL fence wait into functions that
take their GL and CUDA calls as parameters, and test them with fakes:
the order of GL and CUDA work with two and three planes, every failing
step, and every GL wait status.
The mapped path now unmaps the textures when getting a mapped array
fails, instead of returning with them still mapped.