Subtraction and addition of optical signals using a double-grating shearing interferometer