[SYCL] Fix barrier on barrier dependency between queues (#20125)
This is a cherry-pick of intel/llvm#19970
Currently for the pattern like this:
```
sycl::event eb1 = q1.ext_oneapi_submit_barrier();
q2.ext_oneapi_submit_barrier({ eb1 });
```
the second barrier ignores `eb1` in the waitlist because it is not
marked as enqueued even though it is supposed to. This PR fixes that.
Fixes https://github.com/intel/llvm/issues/19777
Patch-by: Artur Gainullin <artur.gainullin@intel.com>