Remove references to g in mapgen.cpp

Use the provided parameter zlevel instead of g->z
Use map::abs_sub instead of g->foo