Minor cleanup of optimizeClosure().

Create static version of optimizeClosure() since index for closure
depends only on section and dm.

Removed non-static optimizeClosure method from CoordsVisitor, since it
is easy to call static version. Keep non-static optimizeClosure method
for VecVisitorMesh because it needs field, which is often not available
in initialize() methods. We should fix this when we setup multiple
fields for multi-physics.