[Gradients] Optimize `_GatherGrad` when shape information is available.
[Gradients] Optimize `_GatherGrad` when shape information is available.

This change avoids using `tf.shape()` or `tf.size()` and creating a data dependency on `params` or `indices` when we have a enough static shape information to determine `values_shape`. In this case, it also reduces graph size for `_GatherGrad` by eliminating `tf.expand_dims()` and `tf.concat()` nodes for building the `tf.reshape()` argument.
