Force creating XlaSharding ops for optimizer slot variables.
Force creating XlaSharding ops for optimizer slot variables.

We do a read_value on the slot variables when creating the update op (eg. ResourceApplyAdagrad) for the optimizer to make sure the XlaSharding op is also generated.

We make this a control dependency for the update op so that this appears before it.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/10635 from hmonishN:hmonish/fix_build_error d344105a62e5f1749d994c2f1f2a8a76a5880c3d
