void cleanupExtensionsMarkedForRemoval() {

		Set<String> names = new HashSet<>(extensionsByName.keySet());
		for (String name : names) {
			List<ExtensionDetails> extensions = extensionsByName.get(name);
			Iterator<ExtensionDetails> it = extensions.iterator();
			while (it.hasNext()) {
				ExtensionDetails extension = it.next();
				if (!extension.isPendingUninstall()) {
					continue;
				}
				if (!removeExtension(extension)) {
					log.error("Error removing extension: " + extension.getInstallPath());
				}

				it.remove();
			}

			if (extensions.isEmpty()) {
				extensionsByName.remove(name);
			}
		}
	}
Removes any extensions that have already been marked for removal.  This should be called
before any class loading has occurred.
Ghidra/Framework/Generic/src/main/java/ghidra/util/extensions/Extensions.java