More work on percolation class. Add virtual top/bottom rows. Change internal data structures to start using union-find class.