gamnit: rewrite `Mesh::dimensions & center` and move to its own module