Cleaning up C interfaces.

No need to pass mesh dimension, number of nodes, number of cells, and
number of hanging edges as separate parameters.

Removed unused FILE* parameter from several functions.

Pass references instead of pointers where possible.