Update Pipe.java

Fixes https://github.com/BuildCraft/BuildCraft/issues/1035 .
resetGate() set's the gate to null which causes a NPE.