World: added generate_step2() - heightmap correction
World: changed grid[] to have all three dimensions stored
World: added generate_step3() - flood fill for the sea
World: fine-tuned generate_step2() a bit
lib/misc.js: added distance_2d()
world_demo: updated