Fixing some leaks and performance.

LTTP, but discovered G_SLICE=always-malloc G_DEBUG=gc-friendly, and consequently, a few more leaks.

Completely destroying memory_cache structures to be more correct on vmi_destroy() and as part of vmi_init_complete().