DFT: Revert changes by PR#2930

Revert changes by Itseez/opencv#2930 since it breaks logic of inverse mode.