Create a simple, non-OO maze generator

This is essentially a direct port of:
http://weblog.jamisbuck.org/2011/1/3/maze-generation-kruskal-s-algorithm