BUG: avoid division by zero in versorOptimizerv4

Gradient magnitude is computed and used as a normalization factor in
itkVersorTransformOptimizerv4.
However, this factor will be zero when we try to register an image to
itself. In such a case, when the gradient vector is zero, we should
stop the optimization process at the beginning.

Change-Id: Ib8a6dcb3928ade8d7d9b14f6fa8166058d15c0ce
Merge topic 'BugVersorOpt'

345b8e1a BUG: avoid division by zero in versorOptimizerv4