PR #11348: [XLA:GPU] Enable Async nccl collective operators in command buffer
PR #11348: [XLA:GPU] Enable Async nccl collective operators in command buffer

Imported from GitHub PR https://github.com/openxla/xla/pull/11348

This PR enables async collective operators (AllReduceCmd, ReduceScatterCmd, AllGatherCmd, CollectiveBroadcastCmd) in command buffers. 

The idea is to translate collective-start thunk to command buffer nccl operator with different execution scope id, and insert a barrier from the original execution scope to the nccl execution scope. on collective-done thunk, it translate into command buffer Barrier command that does synchronization from nccl execution scope to main execution scope.
Copybara import of the project:

--
7678c2306b2f4b477e5a120a61e933d49ba5d14e by Shawn Wang <shawnw@nvidia.com>:

add command buffer scope support for async instructions

use type safe NcclStreamId

fix format

fix unittest failure

fix unittest error

fix test failures

--
0d30d92343b3383c6d97c308199493b331023140 by Shawn Wang <shawnw@nvidia.com>:

fix parameter name

--
0170d4b2b9d9db3302187b0d7d1dd1fa27c089b5 by Shawn Wang <shawnw@nvidia.com>:

add header file

--
0cb9fdb1e5f24a84a6a6d1ed72a0f1270d91e977 by Shawn Wang <shawnw@nvidia.com>:

fix build file

--
321c31204a119ecb92e2bb8489aa6661c8b1cf15 by Shawn Wang <shawnw@nvidia.com>:

fix stream id assignment

--
15bd4871f5dfd23bd8564a5e710b4dce7cf8100b by Shawn Wang <shawnw@nvidia.com>:

fix c-style error

--
dfe36017756e07362fed49a2430d72d394aadb4e by Shawn Wang <shawnw@nvidia.com>:

add dep

Merging this change closes #11348

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11348 from shawnwang18:shawnw/add_async_command_buffer dfe36017756e07362fed49a2430d72d394aadb4e
