The tunnel was the longest and deepest yet built by Hamas, and was “ready for use,” military officials said.