ggate: Avoid dropping the GEOM topology lock in dumpconf
In general it's not safe to drop the topology lock in these routines, as
GEOM assumes that the mesh will be consistent during traversal.
However, there's no reason we can't hold the topology lock across calls
to g_gate_release(). (Note that g_gate_hold() can be called with the
topology lock held.)
PR: 238814
MFC after: 2 weeks
(cherry picked from commit b37b2543a23b44c78f6d78823dcfcedba46570db)