[flang][cuda] Move function result assignment to managed variable on host (#163705)
- Update data transfer detection to let an assignment with a host rhs
and managed lhs to be performed on the host. This helps if the rhs is a
function result.
- Fix test `cuda-maanaged-cuf` introduces on eef4b5a. The test was not
checking for the implicit transfer but the explicit transfer that was
part of the first loop.