Use runtime Assign to deal with the copy (and the temporary creation, so
that this code can deal with polymorphic temps without any change).
Using Assign for the copy is desired here since the copy happens when
the data is not contiguous, and it happens inside an if/then which
makes it hard to optimize.
See https://github.com/llvm/llvm-project/commit/2b60ed405b8110b20ab2e383839759ea34003127
for more details (note that, contrary to this last commit, the code at
hand is only dealing with copy-in/copy-out, it is not intended to deal
with preparing VALUE arguments).
Depends on D142342
nit: maybe rename genHeapTempFromSourceBox to genAllocatableTempFromSourceBox so that it is clear that it returns a box with the allocatable flag set (and we need to reset it afterwards). I think Allocatable always implies Heap, so such naming should be more telling.