Update Pipe.java

Fixes https://github.com/BuildCraft/BuildCraft/issues/1035 .
resetGate() set's the gate to null which causes a NPE.
Merge pull request #1037 from viliml/patch-1

Update Pipe.java