[SYCL][Graph] Add test for linear graph optimizations (#20340)
Follow-up to https://github.com/intel/llvm/pull/20291
- Adds unit test to ensure linear graphs are not tracking sync points
and non-linear graphs are tracking sync points.
- Forward declares a test friend class in `exec_graph_impl` to be able
to inspect the optimizations performed on private members.
---------
Signed-off-by: Matthew Michel <matthew.michel@intel.com>