Spin echoes of nuclear magnetization diffusing in a constant magnetic field gradient and in a restricted geometry