REVIEW: NXCM-5029 explicitly close NamingEnumeration to avoid resource leaks

manual BACKPORT of nexus-2.3.x branch / revision 5ca4a0e7dc7fdef29200e3158b4f48faaa3e3e53