Update Percolation.java

Untested, code might work for memory usage 17 N^2 + 128 N + 1024 bytes
Here we were converting the 1D in a string format.. For N=10, we were using 1010 locations instead of a N^2 or 100(+2 for vtop, vbottom)