More refactoring of functions taking state/world.

Refactored functions so they don't require the entire state/world to be
passed to them.
Renamed init_geom. Updated comments.

The name and function description for init_geom did not accurately
reflect what the function actually did, so it was renamed and the
description was updated.
Commented out a large number of unused functions.

A large number of functions in mem_util.c were not being used anywhere
in the code (except for some old unit_tests), so they were commented
out. We should consider removing them if they no longer serve a useful
purpose. They are described in src/docs/mem_util.pdf.