Simplify sums with Delta[]

The new rules simplify expression of the form

   sum[j1, 1, 3, Delta[gO1, 3 + j1] ZD[gI1, 3 + j1]]

to

   ThetaStep[4, gO1] ThetaStep[gO1, 6] ZD[gI1, gO1]

However, expressions of the form

   sum[j1, 1, 3, Delta[gO1, 3 + j1] ZD[gI1, j1]]

are not yet simplified.  Here one could use the identity

   Delta[k,i+n] == Delta[k-n,i]

But one has to be careful here, because applying this identity
would lead to expressions of the form

   ThetaStep[-3 + gO1, 3] ZD[gI1, -3 + gO1]

If then ThetaStep[-3 + gO1, 3] is converted to an if() statement,
one has to make sure that gO1 is of type int (and not unsigned)!