[Util] Wait for garbage collector on NetworkDiskCache destruction.

Somewhat refs #1329.