Simulating percolation threshold
inspired by programming assignments for Coursera course:
https://class.coursera.org/algs4partI-004
description is here:
http://coursera.cs.princeton.edu/algs4/assignments/percolation.html