Previously, TheImageKind was set to IMG_None and relied on a runtime heuristic to determine the correct image type. This commit sets it explicitly to IMG_Object for AOT-compiled images and IMG_SPIRV for SPIR-V images based on the IsAOTCompileNeeded flag. Also it adds test for this change, which required minor changes in OffloadBinary and OffloadDump.